-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (34 loc) · 1.55 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
name: Release
on:
push:
branches:
- main
workflow_dispatch:
permissions: {}
jobs:
release-please:
uses: ./.github/workflows/release-please.yaml
secrets: inherit
permissions:
contents: write
pull-requests: write
tag-major-minor:
runs-on: ubuntu-latest
needs: release-please
permissions:
contents: write
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git tag --delete v${{ needs.release-please.outputs.major }} || true
git tag --delete v${{ needs.release-please.outputs.major }}.${{ needs.release-please.outputs.minor }} || true
git push --delete origin v${{ needs.release-please.outputs.major }} || true
git push --delete origin v${{ needs.release-please.outputs.major }}.${{ needs.release-please.outputs.minor }} || true
git tag -a v${{ needs.release-please.outputs.major }} -m "Release v${{ needs.release-please.outputs.major }}"
git tag -a v${{ needs.release-please.outputs.major }}.${{ needs.release-please.outputs.minor }} -m "Release v${{ needs.release-please.outputs.major }}.${{ needs.release-please.outputs.minor }}"
git push origin v${{ needs.release-please.outputs.major }}
git push origin v${{ needs.release-please.outputs.major }}.${{ needs.release-please.outputs.minor }}