diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index a69b57b76..5291cc36f 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -35,9 +35,26 @@ ${{ secrets.OSDS_PACKAGING_ROLE }} - name: Run release-please + id: release uses: googleapis/release-please-action@v4 with: release-type: node token: ${{ env.OSDS_ACCESS_TOKEN }} config-file: release-please-config.json manifest-file: .release-please-manifest.json + + - name: Checkout Again + uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Tag Major Version + if: ${{ steps.release.outputs.release_created }} + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/googleapis/release-please-action.git" + git tag -d v${{ steps.release.outputs.major }} || true + git push origin :v${{ steps.release.outputs.major }} || true + git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}" + git push origin v${{ steps.release.outputs.major }}