Commit | Line | Data |
---|---|---|
2c02376b JB |
1 | name: Release Please |
2 | ||
3 | on: | |
4 | push: | |
5 | branches: | |
6 | - main | |
7 | ||
8cf1b9ef JB |
8 | permissions: |
9 | contents: write | |
10 | pull-requests: write | |
11 | ||
2c02376b JB |
12 | jobs: |
13 | release-please: | |
14 | runs-on: ubuntu-latest | |
15 | steps: | |
16 | - uses: googleapis/release-please-action@v4 | |
17 | id: release | |
18 | with: | |
19 | config-file: .github/release-please/config.json | |
20 | manifest-file: .github/release-please/manifest.json | |
60b14fe6 | 21 | - name: Create tags for major and minor versions |
2c02376b JB |
22 | if: ${{ steps.release.outputs.release_created }} |
23 | run: | | |
24 | git config user.name github-actions[bot] | |
25 | git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
26 | git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/googleapis/release-please-action.git" | |
27 | git tag -d v${{ steps.release.outputs.major }} || true | |
28 | git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true | |
29 | git push origin :v${{ steps.release.outputs.major }} || true | |
30 | git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true | |
31 | git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}" | |
32 | git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}" | |
33 | git push origin v${{ steps.release.outputs.major }} | |
34 | git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} |