-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (47 loc) · 1.32 KB
/
release.yaml
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
name: Releases
on:
push:
branches:
- master
release:
types:
- created
jobs:
docs-deploy:
name: Deploy docs
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: qutech-delft/github-actions/actions/docs/sphinx-docs-deploy@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
python-build:
name: Build Python package
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: qutech-delft/github-actions/actions/python/poetry-build@master
python-deploy:
name: Deploy Python package
runs-on: "ubuntu-latest"
needs: python-build
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: dist
path: dist
# Publishing the package
- name: Publish distribution 📦 to Test PyPI
if: github.ref == 'refs/heads/master'
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true
- name: Publish distribution 📦 to PyPI
if: github.event_name == 'release' && github.event.action == 'created'
uses: pypa/gh-action-pypi-publish@release/v1