-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 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
name: Upload package to PYPI
on:
push:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+'
- 'v[0-9]+\.[0-9]+\.[0-9]+'
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
permissions:
contents: write
discussions: write
jobs:
upload-to-pypi:
runs-on: [self-hosted, Keroberos]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
strip_v: false
- name: Creating a realease/pre-release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{steps.tag.outputs.tag}}
draft: false
prerelease: ${{ contains(github.ref, '-rc') }}
generate_release_notes: true
- name: Publish a Python distribution to PyPI
if: ${{ contains(github.ref, '-rc') }} == false
uses: conchylicultor/pypi-build-publish@v1
with:
pypi-token: ${{ secrets.PYPI_MASTER_TOKEN }}