-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (41 loc) · 1.21 KB
/
release.yml
File metadata and controls
52 lines (41 loc) · 1.21 KB
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
51
52
name: Release
on:
push:
branches:
- main
# workflow_run:
# workflows: ['COMPAS compile test']
# types:
# - completed
jobs:
release:
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
ref: main
- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip' # Enable caching for pip dependencies
- name: Semantic Version Release
id: release
# Adjust tag with desired version if applicable.
uses: python-semantic-release/python-semantic-release@v9.12.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
git_committer_name: "github-actions"
git_committer_email: "actions@users.noreply.github.com"
- name: build dist for pypi
if: steps.release.outputs.released == 'true'
run: |
python -m pip install --upgrade build
python -m build --sdist --wheel --outdir dist/
- name: pypi-publish
if: steps.release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@v1.12.3