forked from birdybirdonline/Linux-Arctis-7-Plus-ChatMix
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 1.11 KB
/
build-on-tag.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
on:
push:
tags:
- 'v*'
name: Create RPM Release
jobs:
build_rpm:
name: Build .rpm package
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Read CHANGELOG.md
id: changelog
uses: jaywcjlove/github-action-read-file@main
with:
path: CHANGELOG.md
- name: Replace version in RPM spec so correct source is downloaded when building RPM
run: sed -Ei 's/(^Version:[[:space:]]*).*/\1${{github.ref_name}}/' arctis-manager.rpm.spec
- name: Run rpmbuild on RPM spec to produce package
id: rpm_build
uses: alvarolopez/rpmbuild@rockylinux9
with:
spec_file: "arctis-manager.rpm.spec"
release:
name: Create release with all assets
needs: [build_rpm]
runs-on: ubuntu-latest
steps:
- name: Download cached rpm artifact
uses: actions/download-artifact@v3
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
arctis-manager-${{ github.ref_name }}-1.${{ env.DIST }}.${{ env.ARCH }}.rpm/**/*.rpm