Skip to content

Commit 33167b0

Browse files
committed
fix: bring back major minor tagging
1 parent 7fac3c2 commit 33167b0

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

.github/workflows/conventional-prs.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ on:
77
- edited
88
- synchronize
99

10-
permissions:
11-
pull-requests: read
12-
1310
jobs:
1411
main:
1512
name: Validate PR title
1613
runs-on: ubuntu-latest
14+
permissions:
15+
pull-requests: read
1716
steps:
1817
- uses: amannn/action-semantic-pull-request@v6
1918
env:

.github/workflows/release-please.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,22 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: googleapis/release-please-action@v4
18+
id: release
1819
with:
1920
token: ${{ secrets.GITHUB_TOKEN }}
2021
release-type: go # just keep a changelog, no version anywhere outside of git tags
22+
- uses: actions/checkout@v4
23+
- name: tag major and minor versions
24+
if: ${{ steps.release.outputs.release_created }}
25+
run: |
26+
git config user.name github-actions[bot]
27+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
28+
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/googleapis/release-please-action.git"
29+
git tag -d v${{ steps.release.outputs.major }} || true
30+
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
31+
git push origin :v${{ steps.release.outputs.major }} || true
32+
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
33+
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
34+
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
35+
git push origin v${{ steps.release.outputs.major }}
36+
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}

0 commit comments

Comments
 (0)