Release v0.1.0-beta.8 #10
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: release | |
| # Publishes @day8/re-frame-pair to npm when a semver tag is pushed. | |
| # | |
| # Flow: | |
| # 1. Developer updates version in package.json + .claude-plugin/plugin.json. | |
| # 2. Developer commits and tags: git tag v0.1.0-alpha.2 && git push --tags | |
| # 3. This workflow runs: it verifies the tag matches package.json version, | |
| # runs the runtime unit tests (if shadow-cljs is available), and | |
| # publishes to npm under @day8/re-frame-pair. | |
| # | |
| # Secrets required: | |
| # NPM_TOKEN — npm automation token with publish scope on @day8 | |
| # | |
| # See RELEASING.md for the full checklist. | |
| on: | |
| push: | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Node | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: "20" | |
| registry-url: "https://registry.npmjs.org" | |
| scope: "@day8" | |
| - name: Verify tag matches package.json version | |
| run: | | |
| TAG="${GITHUB_REF_NAME#v}" | |
| PKG="$(node -p "require('./package.json').version")" | |
| if [ "$TAG" != "$PKG" ]; then | |
| echo "Tag $TAG does not match package.json version $PKG" | |
| exit 1 | |
| fi | |
| echo "Publishing $PKG" | |
| - name: Verify plugin manifest version matches | |
| run: | | |
| PKG="$(node -p "require('./package.json').version")" | |
| PLUGIN="$(node -p "require('./.claude-plugin/plugin.json').version")" | |
| if [ "$PKG" != "$PLUGIN" ]; then | |
| echo ".claude-plugin/plugin.json version ($PLUGIN) does not match package.json ($PKG)" | |
| exit 1 | |
| fi | |
| - name: Install Clojure CLI and Babashka | |
| # cli is needed for shadow-cljs's :deps true mode (shells out | |
| # to `clojure` for classpath resolution) — npm test below | |
| # invokes shadow-cljs which requires this. | |
| uses: DeLaGuardo/setup-clojure@02f5a82b79a547523e664fe8a7a32ea14884d7b2 # 13.6.0 | |
| with: | |
| cli: "latest" | |
| bb: "latest" | |
| - name: Smoke-test babashka scripts | |
| run: | | |
| bb scripts/ops.clj unknown-subcommand 2>&1 | grep -q ":unknown-subcommand" | |
| echo "ops.clj dispatcher responds" | |
| - name: Set up JDK (for shadow-cljs) | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | |
| with: | |
| distribution: "temurin" | |
| java-version: "21" | |
| - name: Install npm deps | |
| run: npm install | |
| - name: Run CLJS unit tests | |
| run: npm test | |
| # npm publish disabled until the NPM_TOKEN secret is wired up on | |
| # this repo. Until then, users install per docs/LOCAL_DEV.md | |
| # ('not yet published to npm' is called out in README's Install | |
| # section). Restore by adding back: | |
| # | |
| # - name: Publish to npm | |
| # run: npm publish | |
| # env: | |
| # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Create GitHub release | |
| uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0 | |
| with: | |
| draft: false | |
| prerelease: ${{ contains(github.ref_name, '-alpha') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-rc') }} | |
| generate_release_notes: true | |