diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e4c5deb..d1f2c23 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,11 +3,11 @@ name: Release on: push: tags: - - "v*" + - 'v*' workflow_dispatch: inputs: version: - description: "Version to release (e.g. 0.1.1)" + description: 'Version to release (e.g. 1.0.1)' required: true type: string @@ -22,21 +22,20 @@ jobs: - uses: actions/checkout@v7 - uses: actions/setup-node@v7 with: - node-version: "24" - registry-url: "https://registry.npmjs.org" + node-version: '24' + registry-url: 'https://registry.npmjs.org' - run: npm ci - run: npm run lint - - run: npm run format:check - run: npm run build - run: npm test - - name: Set version from workflow input - if: github.event_name == "workflow_dispatch" + - name: Set version from workflow input (patch release) + if: github.event_name == 'workflow_dispatch' run: | current=$(node -p "require('./package.json').version") if [ "$current" != "${{ inputs.version }}" ]; then npm version ${{ inputs.version }} --no-git-tag-version fi - - run: npm publish --provenance --access public + - run: npm publish --access public --provenance github-release: needs: publish