-
Notifications
You must be signed in to change notification settings - Fork 19
63 lines (61 loc) · 1.8 KB
/
release-please.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
on:
push:
branches:
- main
permissions:
contents: write
checks: write
actions: read
packages: write
pull-requests: write
name: Release Please
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.release-please.outputs.releases_created }}
tag: ${{ steps.release-please.outputs.tag_name }}
upload_url: ${{ steps.release-please.outputs.upload_url }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release-please
with:
release-type: python
package-name: yafti
package:
name: Create RPM Release
runs-on: ubuntu-latest
needs: release-please
if: needs.release-please.outputs.releases_created
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.4.0
virtualenvs-create: true
virtualenvs-in-project: true
- name: Build and upload to PyPI
run: |
poetry config pypi-token.pypi "$PYPI_UPLOAD_TOKEN"
poetry build
poetry publish
env:
PYPI_UPLOAD_TOKEN: ${{ secrets.PYPI_UPLOAD_TOKEN }}
- name: Build RPM Package
id: rpm_build
uses: ublue-os/rpmbuild@master
with:
spec_file: "pkg/rpm.spec"
- name: Upload release binaries
uses: ublue-os/upload-assets@pass-in-tag
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["./${{ steps.rpm_build.outputs.source_rpm_path }}*", "./${{ steps.rpm_build.outputs.rpm_dir_path }}noarch/*"]'
tag: ${{ needs.release-please.outputs.tag }}