-
Notifications
You must be signed in to change notification settings - Fork 41
79 lines (75 loc) · 2.02 KB
/
publish.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Publish
on:
push:
tags:
- 'beaker-*'
jobs:
build-python-package:
strategy:
matrix:
component:
- "Common"
- "Client"
name: Build python package
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install python dependencies
run: pip install --upgrade pip && pip install build
- name: Build python package
run: cd ${{ matrix.component }} && python -m build
- name: Upload python artifacts
uses: actions/upload-artifact@v4
with:
path: ${{ matrix.component }}/dist
name: artifact-${{ matrix.component }}
publish-python-package:
needs:
- "build-python-package"
environment: production
permissions:
id-token: write
strategy:
matrix:
component:
- "Common"
- "Client"
name: Publish package to PyPI
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: artifact-${{ matrix.component }}
- name: Display structure of downloaded files
run: ls -R
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
print-hash: true
release-rpm:
runs-on: ubuntu-latest
environment: production
container:
image: fedora:39
steps:
- uses: actions/checkout@v1
- name: Install release toolbox
run: |
dnf install git rpkg copr-cli /usr/bin/spectool -y
- name: Setup Copr config file
env:
# https://copr.fedorainfracloud.org/api/.
COPR_CONFIG_FILE: ${{ secrets.COPR_CONFIG }}
run: |
mkdir -p ~/.config
printf "$COPR_CONFIG_FILE" > ~/.config/copr
- name: Build new packages
run: |
spectool -g beaker.spec
rpkg copr-build @beaker-project/beaker