Skip to content

Commit 002e66e

Browse files
author
Giacomo 'Mr. Wolf' Furlan
committed
CI/CD
1 parent 9615808 commit 002e66e

File tree

2 files changed

+45
-51
lines changed

2 files changed

+45
-51
lines changed

.github/workflows/build-on-tag.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
on:
2+
push:
3+
tags:
4+
- 'v*'
5+
6+
name: Create RPM Release
7+
8+
jobs:
9+
build_rpm:
10+
name: Create RPM Release
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
15+
- name: Checkout code
16+
uses: actions/checkout@master
17+
18+
- name: Read CHANGELOG.md
19+
id: changelog
20+
uses: jaywcjlove/github-action-read-file@main
21+
with:
22+
path: CHANGELOG.md
23+
24+
- name: Replace version in RPM spec so correct source is downloaded when building RPM
25+
run: sed -Ei 's/(^Version:[[:space:]]*).*/\1${{github.ref_name}}/' arctis-manager.rpm.spec
26+
27+
- name: Run rpmbuild on RPM spec to produce package
28+
id: rpm_build
29+
uses: naveenrajm7/rpmbuild@master
30+
with:
31+
spec_file: "arctis-manager.rpm.spec"
32+
33+
release:
34+
name: Create release with all assets
35+
needs: [build_rpm]
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Download cached rpm artifact
39+
uses: actions/download-artifact@v3
40+
41+
- name: Release
42+
uses: softprops/action-gh-release@v1
43+
with:
44+
files: |
45+
arctis-manager-${{ github.ref_name }}-1.${{ env.DIST }}.${{ env.ARCH }}.rpm/**/*.rpm

.github/workflows/build-rpm.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)