v0.3.0 (#198) #113
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 | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - package.json | |
| permissions: {} | |
| jobs: | |
| check: | |
| name: Check version | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.version.outputs.version }} | |
| version_changed: ${{ steps.version.outputs.changed }} | |
| steps: | |
| - uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2 | |
| - name: Check version changes | |
| uses: EndBug/version-check@095362f3cd50f690c8fa0e6afeea81834bd8d320 # v3.0.0 | |
| id: version | |
| with: | |
| static-checking: localIsNew | |
| file-url: https://unpkg.com/coc-oxc@latest/package.json | |
| file-name: package.json | |
| - name: Set version name | |
| if: steps.version.outputs.changed == 'true' | |
| run: | | |
| echo "Version change found! New version: ${{ steps.version.outputs.version }} (${{ steps.version.outputs.version_type }})" | |
| release: | |
| needs: check | |
| if: needs.check.outputs.version_changed == 'true' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2 | |
| - uses: oxc-project/setup-node@ab97f03642370d79a7e96dd286bd02a1be40e0ba # v1.3.0 | |
| - run: pnpm run build | |
| - run: npm install -g npm@latest # For trusted publishing support | |
| - run: pnpm publish --tag latest --provenance --access public | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0 | |
| with: | |
| draft: false | |
| name: v${{ needs.check.outputs.version }} | |
| tag_name: v${{ needs.check.outputs.version }} | |
| target_commitish: ${{ github.sha }} | |
| generate_release_notes: true |