-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (46 loc) · 1.93 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
name: Release
on:
push:
branches:
- main
jobs:
Please:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- id: release
name: Release
uses: google-github-actions/release-please-action@v3
with:
command: manifest
config-file: .github/release-please-config.json
manifest-file: .github/release-please-manifest.json
release-type: simple
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
- if: ${{ steps.release.outputs.release_created }}
name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ steps.release.outputs.tag_name }}
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
persist-credentials: true
- if: ${{ steps.release.outputs.release_created }}
name: Tag
run: |
git config user.name doomspork
git config user.email [email protected]
git tag -d latest || true
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 :latest || 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 latest -m "chore(main): release latest"
git tag -a v${{ steps.release.outputs.major }} -m "chore(main): release ${{ steps.release.outputs.major }}"
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "chore(main): release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
git push origin latest
git push origin v${{ steps.release.outputs.major }}
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}