-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (45 loc) · 1.36 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: New Release
on:
workflow_dispatch:
push:
branches:
- main
jobs:
semantic_release:
runs-on: ubuntu-latest
concurrency: semantic_release
permissions:
id-token: write
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "${HOME}/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install
- name: Set PYTHONPATH to subdirectory sdcat
run: echo "PYTHONPATH=." >> $GITHUB_ENV
- name: Check release status
id: release-status
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install python-semantic-release
##########################################################################
# Add a --noop flag to check without releasing if adding pypi to next steps
##########################################################################
if semantic-release --strict version
then
echo "Releasing new version."
else
echo "Skipping release steps."
fi