Skip to content

Commit 9b5b0b5

Browse files
committed
build: release tag update
1 parent cdd5c02 commit 9b5b0b5

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,22 @@ jobs:
1313
release:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: GoogleCloudPlatform/release-please-action@v4
16+
- id: release
17+
uses: GoogleCloudPlatform/release-please-action@v4
1718
with:
1819
release-type: node
20+
- uses: actions/checkout@v4
21+
- name: tag major and minor versions
22+
if: ${{ steps.release.outputs.release_created }}
23+
run: |
24+
git config user.name github-actions[bot]
25+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
26+
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/googleapis/release-please-action.git"
27+
git tag -d v${{ steps.release.outputs.major }} || true
28+
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
29+
git push origin :v${{ steps.release.outputs.major }} || true
30+
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
31+
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
32+
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
33+
git push origin v${{ steps.release.outputs.major }}
34+
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}

0 commit comments

Comments
 (0)