-
Notifications
You must be signed in to change notification settings - Fork 54
44 lines (36 loc) · 949 Bytes
/
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
name: Publish crc-bonfire to PyPI
on:
push:
branches:
- master
tags:
- '*'
jobs:
build-and-publish:
name: Build and publish to PyPI
if: startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-22.04
environment:
name: release
url: https://pypi.org/p/crc-bonfire
permissions:
# mandatory for trusted publishing
id-token: write
steps:
- name: Checkout to master
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'
- name: Install build dependencies
run: |
pip install build twine
- name: Build sdist and wheel
run: |
python -m build -o dist/
- name: Twine check
run: python -m twine check dist/*
- name: Deploy to PyPi
uses: pypa/gh-action-pypi-publish@release/v1