File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 runs-on : ubuntu-latest
88 steps :
99 - uses : actions/checkout@v4
10+ with :
11+ # use a token so we trigger release-please if needed
12+ token : ${{ secrets.BOT_GITHUB_TOKEN }}
1013 - name : Setup Node
1114 uses : actions/setup-node@v4
1215 with :
1619 - name : Build TypeScript
1720 run : npm run build
1821 - name : Commit build changes
19- id : current_sha
2022 if : ${{ github.ref == 'refs/heads/main' }}
2123 run : |
2224 git config --local user.name "github-actions[bot]"
2527 if git diff --cached --quiet HEAD; then
2628 echo "No changes to commit."
2729 else
28- git commit -m "chore(build): Update dist [skip ci]"
30+ git commit -m "chore(build): Update dist"
31+ git push
2932 fi
30- echo "current_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
Original file line number Diff line number Diff line change 1+ name : release
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - next
8+
9+ jobs :
10+ release-please :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - uses : googleapis/release-please-action@v4
15+ id : release
16+ with :
17+ release-type : node
18+ target-branch : ${{ github.ref_name }}
19+ - uses : actions/checkout@v4
20+ - name : tag major and minor versions
21+ if : ${{ steps.release.outputs.release_created }}
22+ run : |
23+ git config --local user.name "github-actions[bot]"
24+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
25+ git tag -d v${{ steps.release.outputs.major }} || true
26+ git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
27+ git push origin :v${{ steps.release.outputs.major }} || true
28+ git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
29+ git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
30+ git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
31+ git push origin v${{ steps.release.outputs.major }}
32+ git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
You can’t perform that action at this time.
0 commit comments