-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (36 loc) · 1.16 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
# .github/workflows/release.yml
name: 📦 Release 'keyrings.codeartifact' package.
on: push
jobs:
release:
name: 📦 Build and publish package.
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: 🛒 Checkout repository source code.
uses: actions/checkout@v4
with:
# Always fetch the full repository.
fetch-depth: 0
- name: ✨ Setup Python 3.x environment.
uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: 'pip'
- name: 🔬 Execute all unit tests.
run: |
python3 -m pip install .[testing]
python3 -m pytest
- name: 🛠️ Build package and source distribution.
run: |
python3 -m pip install --user build
python3 -m build --sdist --wheel --outdir dist/
- name: 🚀 Publish package to test PyPI index.
uses: pypa/gh-action-pypi-publish@release/v1.8
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
- name: 🚀 Publish package to main PyPI index.
uses: pypa/gh-action-pypi-publish@release/v1.8
if: startsWith(github.ref, 'refs/tags')