Skip to content

Commit 8f1843f

Browse files
committed
ci: test release workflow (dry run on push)
Temporarily triggers on all pushes with dry-run mode to validate Docker build, changelog extraction, and npm publish --dry-run. Bumps version to 2.4.0 with changelog entry for testing. Revert this commit after testing. Made-with: Cursor
1 parent 18e1c31 commit 8f1843f

3 files changed

Lines changed: 24 additions & 22 deletions

File tree

.github/workflows/release.yml

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ name: Release CLI
22

33
on:
44
push:
5-
tags:
6-
- "cli-v*"
7-
workflow_dispatch:
8-
inputs:
9-
dry_run:
10-
description: "Dry run: build and validate, skip actual publish"
11-
type: boolean
12-
default: true
5+
# TODO: revert after testing — restore tag trigger and workflow_dispatch
6+
# push:
7+
# tags:
8+
# - "cli-v*"
9+
# workflow_dispatch:
10+
# inputs:
11+
# dry_run:
12+
# description: "Dry run: build and validate, skip actual publish"
13+
# type: boolean
14+
# default: true
1315

1416
permissions:
1517
contents: write
@@ -28,7 +30,7 @@ jobs:
2830
fetch-depth: 0
2931

3032
- name: Abort if tag is not on main
31-
if: github.event_name == 'push'
33+
if: false # TODO: revert — disabled for testing
3234
run: |
3335
set -euo pipefail
3436
git fetch origin main
@@ -43,11 +45,8 @@ jobs:
4345
id: version
4446
working-directory: cli
4547
run: |
46-
if [ "${{ github.event_name }}" = "push" ]; then
47-
VERSION="${GITHUB_REF_NAME#cli-v}"
48-
else
49-
VERSION=$(node -p "require('./package.json').version")
50-
fi
48+
# TODO: revert — always read from package.json for testing
49+
VERSION=$(node -p "require('./package.json').version")
5150
if ! echo "$VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?$'; then
5251
echo "::error::Invalid version: ${VERSION}"
5352
exit 1
@@ -56,7 +55,7 @@ jobs:
5655
echo "Version: $VERSION"
5756
5857
- name: Validate version matches package.json
59-
if: github.event_name == 'push'
58+
if: false # TODO: revert — needs tag, disabled for testing
6059
working-directory: cli
6160
env:
6261
TAG_VERSION: ${{ steps.version.outputs.version }}
@@ -156,19 +155,19 @@ jobs:
156155
} >> /tmp/release-notes.md
157156
158157
- name: Publish to npm (dry run)
159-
if: inputs.dry_run
160158
working-directory: cli
161159
run: npm publish --provenance --ignore-scripts --dry-run
162160

163-
- name: Publish to npm
164-
if: ${{ !inputs.dry_run }}
165-
working-directory: cli
166-
run: npm publish --provenance --ignore-scripts
161+
# TODO: revert — skip real publish and GH release for testing
162+
# - name: Publish to npm
163+
# if: ${{ !inputs.dry_run }}
164+
# working-directory: cli
165+
# run: npm publish --provenance --ignore-scripts
167166

168167
# --- GitHub Release ---
169168

170169
- name: Create GitHub Release
171-
if: ${{ !inputs.dry_run }}
170+
if: false # TODO: revert — disabled for testing
172171
env:
173172
GH_TOKEN: ${{ github.token }}
174173
TAG: ${{ github.ref_name }}

cli/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Mops CLI Changelog
22

33
## Next
4+
5+
## 2.4.0
46
- Fix `mops check`, `mops build`, and `mops check-stable` failing to find canister entrypoints when run from a subdirectory
7+
- Automate CLI release process via GitHub Actions
58

69
## 2.3.1
710
- Fix `mops build` and `mops check-candid` failing with "Wasm bindings have not been set" when installed via `npm i -g ic-mops`

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ic-mops",
3-
"version": "2.3.1",
3+
"version": "2.4.0",
44
"type": "module",
55
"bin": {
66
"mops": "dist/bin/mops.js",

0 commit comments

Comments
 (0)