release-please #165
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release-please | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: ${{ vars.GH_APP_ID }} | |
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
- uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4.1.1 | |
id: release | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
- name: tag major and minor versions | |
if: ${{ steps.release.outputs.release_created }} | |
run: | | |
git config user.name ${{ vars.GH_APP_NAME }}[bot] | |
git config user.email ${{ vars.GH_APP_NAME }}[bot]@users.noreply.github.com | |
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 }} |