-
Notifications
You must be signed in to change notification settings - Fork 14
36 lines (34 loc) · 1.09 KB
/
run_semantic_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: Semantic release
on:
push:
branches:
- "master"
jobs:
semantic-release:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false # The auth token is persisted in the local git config. semantic-release picks this one instead of GH_TOKEN
- name: Cancel previous builds
uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run python-semantic-release
run: |
pip install python-semantic-release
VERSION=$(semantic-release version --print)
sed -i "s/@version .*/@version $VERSION/" manager/manager.go
git add manager/manager.go
semantic-release version
env:
GH_TOKEN: "${{ secrets.GH_TOKEN }}"