name: Release on: push: tags: ['v*'] permissions: contents: write jobs: build-release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: '20' # Before the build, so a tag with no release notes fails in seconds instead of # publishing a body that is only a changelog link (AGENTS.md, issue #12). - name: Assemble release notes run: node scripts/release-notes.mjs "$GITHUB_REF_NAME" > RELEASE_BODY.md - run: npm ci - run: npm run build - name: Package dist run: cd dist && zip -r "../coredrive-rx-${GITHUB_REF_NAME}.zip" . && cd .. - name: Publish release with the built artifact uses: softprops/action-gh-release@v2 with: files: coredrive-rx-*.zip body_path: RELEASE_BODY.md