forked from avocado-framework/aautils
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (54 loc) · 1.73 KB
/
pre-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
48
49
50
51
52
53
54
55
56
57
58
59
# must do before using this action:
# - set up RELEASE_TOKEN in secrets of the repository avocado-framework/avocado
# - set up RTD_TOKEN in secrets to update readthedocs
# - set up two tokens for twine: PYPI_USER and PYPI_PASSWD
name: Pre-Release
on: workflow_dispatch
jobs:
release-test:
name: Pre-Release pipeline
runs-on: ubuntu-latest
container:
image: fedora:34
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c
with:
app_id: ${{ secrets.MR_AVOCADO_ID }}
installation_id: ${{ secrets.MR_AVOCADO_INSTALLATION_ID }}
private_key: ${{ secrets.MR_AVOCADO_PRIVATE_KEY }}
- name: install required packages
run: dnf -y install git python3-pip
- uses: actions/checkout@v4
- name: Build wheel
run: |
python3 -m pip install build
mkdir PYPI_UPLOAD
python3 -m build -o PYPI_UPLOAD
- name: Save wheel as artifact
uses: actions/upload-artifact@v4
with:
name: wheel
path: ${{github.workspace}}/PYPI_UPLOAD/
retention-days: 3
publish-to-test-pypi:
name: Publish Avocado to TestPyPI
needs:
- release-test
runs-on: ubuntu-latest
environment:
name: pypi
url: https://test.pypi.org/project/autils
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the wheels
uses: actions/download-artifact@v4
with:
name: wheel
path: dist/
- name: Publish avocado to test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/