-
Notifications
You must be signed in to change notification settings - Fork 24
40 lines (33 loc) · 1.06 KB
/
tag.yml
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
name: Pre-release Tag
on:
pull_request_target:
types: [closed]
branches: [master]
jobs:
prepare-release:
# this job will only run if the PR has been merged
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.DEPLOY_KEY }} # with this we can bypass branch protection rules here (no-push)
- uses: actions/setup-node@v3
with:
node-version: "20"
- name: Setup git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Check release version
run: |
export VERSION=$(tools/cicd/build/version.sh)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Prepare git tag
run: |
export TAG=v${{ env.VERSION }}
git tag -f -a $TAG -m "Release $TAG"
- name: Commit changes
run: |
git push -f --tags --no-verify