-
Notifications
You must be signed in to change notification settings - Fork 13
47 lines (39 loc) · 1.07 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
name: Automatic release
on:
workflow_dispatch:
inputs:
version:
description: "Version of the new release (e.g. `0.0.1`)"
required: true
jobs:
release:
runs-on: ubuntu-latest
env:
VERSION: ${{ github.event.inputs.version }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.NORMANRZ_PAT }}
- uses: actions/setup-python@v4
with:
python-version: "3.10"
architecture: 'x64'
- name: Setup git config
run: |
git config user.name "Automatic release"
git config user.email "<>"
- name: Check whether tag already exists
run: |
if git show-ref --tags "v${VERSION}" --quiet; then
echo "Version $VERSION already exists. Stopping."
exit 1
fi
- name: Make and push release
run: |
_tooling/make_release.sh ${VERSION}
git add */Changelog.md
git commit -m "Release for v${VERSION}"
git tag v${VERSION}
git push origin master
git push --tags