Skip to content

Commit b5393b2

Browse files
authoredJul 24, 2024··
ci: create major and minor tags on release for actions version (#60)
1 parent ea7683f commit b5393b2

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed
 

‎.github/workflows/release-please.yml

+22-3
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,32 @@ jobs:
1515
steps:
1616
- name: Release
1717
id: release
18-
uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4.1.1
18+
uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4.1.3
1919

20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
if: ${{ steps.release.outputs.release_created }}
2222

23+
- name: tag major and minor versions
24+
if: ${{ steps.release.outputs.release_created }}
25+
run: |
26+
# setup github actions bot as author
27+
git config user.name github-actions[bot]
28+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
29+
30+
# removing previous tags
31+
git tag -d v${{ steps.release.outputs.major }} || true
32+
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
33+
git push origin :v${{ steps.release.outputs.major }} || true
34+
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
35+
36+
# creating new tags
37+
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
38+
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
39+
git push origin v${{ steps.release.outputs.major }}
40+
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
41+
2342
- name: Set up Python
24-
uses: actions/setup-python@v3
43+
uses: actions/setup-python@v5
2544
if: ${{ steps.release.outputs.release_created }}
2645
with:
2746
python-version: '3.x'

0 commit comments

Comments
 (0)
Please sign in to comment.