Release #6
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: | |
| inputs: | |
| version: | |
| description: "Semver version to release (e.g. 1.2.3)" | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Update package.json versions | |
| run: | | |
| cd packages/cli | |
| npm pkg set version=${{ inputs.version }} | |
| cd ../plugin | |
| npm pkg set version=${{ inputs.version }} | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run build | |
| run: bun run build | |
| - name: Run tests | |
| run: bun test | |
| - name: Commit version update | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add packages/cli/package.json packages/plugin/package.json | |
| git commit -m "chore: bump version to ${{ inputs.version }}" | |
| git push origin HEAD:main | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: v${{ inputs.version }} | |
| name: v${{ inputs.version }} | |
| generate_release_notes: true |