Skip to content

Commit

Permalink
feat: 👷 (#432) add creation of major/minor tags
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasAugustin committed Jan 6, 2024
1 parent 24d0c69 commit 8216743
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/release_please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
tag_name:
description: "The tag name"
value: ${{ jobs.release_please.outputs.tag_name }}

workflow_dispatch:

permissions:
Expand All @@ -19,10 +20,25 @@ jobs:
release_please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release_please.outputs.release_created }}
tag_name: ${{ steps.release_please.outputs.tag_name }}
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: google-github-actions/release-please-action@v4
id: release_please
id: release
with:
release-type: simple
- uses: actions/checkout@v4
- name: tag major and minor versions
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/google-github-actions/release-please-action.git"
git tag -d v${{ steps.release.outputs.major }} || true
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git push origin :v${{ steps.release.outputs.major }} || true
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
git push origin v${{ steps.release.outputs.major }}
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}

0 comments on commit 8216743

Please sign in to comment.