-
Notifications
You must be signed in to change notification settings - Fork 57
50 lines (48 loc) · 1.23 KB
/
release.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
41
42
43
44
45
46
47
48
49
50
name: Release
on:
push:
branches: [ main ]
tags-ignore:
- '*'
jobs:
unit-test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- run: make test
integration-test:
runs-on: ubuntu-latest
needs: unit-test
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
- name: Create a Release
uses: elgohr/Github-Release-Action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
title: ${{ github.sha }}
- name: Create a tagged Release
uses: elgohr/Github-Release-Action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
title: ${{ github.sha }}
tag: ${{ github.run_id }}
release:
runs-on: ubuntu-latest
needs: integration-test
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.RELEASE_TOKEN }} # for pushing to protected branch
- name: Publish new version
run: |
git config --global user.email "[email protected]"
git config --global user.name "Release Bot"
git tag -fa v5 -m "Update v5 tag"
git push origin v5 --force