chore: release 0.1.6 (#20) #20
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 Please | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| release-please: | |
| name: Release Please | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| tag_name: ${{ steps.release.outputs.tag_name }} | |
| version: ${{ steps.release.outputs.version }} | |
| pr: ${{ steps.release.outputs.pr }} | |
| steps: | |
| - name: Run release-please | |
| uses: googleapis/release-please-action@v4 | |
| id: release | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| config-file: release-please-config.json | |
| manifest-file: .release-please-manifest.json | |
| - name: Checkout repository | |
| if: ${{ steps.release.outputs.pr }} | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ fromJson(steps.release.outputs.pr).headBranchName }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Node.js | |
| if: ${{ steps.release.outputs.pr }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Sync npm package versions | |
| if: ${{ steps.release.outputs.pr }} | |
| run: node scripts/sync-versions.js | |
| - name: Commit synced versions | |
| if: ${{ steps.release.outputs.pr }} | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add npm/ | |
| if git diff --staged --quiet; then | |
| echo "No version changes to commit" | |
| else | |
| git commit -m "chore: sync npm package versions" | |
| git push | |
| fi | |
| - name: Output release info | |
| if: ${{ steps.release.outputs.release_created }} | |
| run: | | |
| echo "Release created!" | |
| echo "Tag: ${{ steps.release.outputs.tag_name }}" | |
| echo "Version: ${{ steps.release.outputs.version }}" |