Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,32 @@ on:
branches: [main]

jobs:
release:
release-and-publish:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'Release')
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org

- name: Read version from package.json
id: pkg
run: echo "version=$(node -p "require('./package.json').version")" >> "$GITHUB_OUTPUT"

- run: npm ci

- run: npm run typecheck

- run: npm test

- run: npm run build

- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
Expand All @@ -26,3 +40,7 @@ jobs:
--title "v${{ steps.pkg.outputs.version }}" \
--generate-notes \
--target main

- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}