Skip to content

Commit 9615808

Browse files
author
Giacomo 'Mr. Wolf' Furlan
committed
Github actions: build RPM
1 parent e3b40eb commit 9615808

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed

.github/workflows/build-rpm.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
on:
2+
push:
3+
tags:
4+
- 'v*'
5+
6+
name: Create RPM Release
7+
8+
jobs:
9+
build:
10+
name: Create RPM Release
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
15+
- name: Read CHANGELOG.md
16+
id: changelog
17+
uses: jaywcjlove/github-action-read-file@main
18+
with:
19+
path: CHANGELOG.md
20+
21+
- name: Checkout code
22+
uses: actions/checkout@master
23+
24+
- name: Create Release
25+
id: create_release
26+
uses: actions/create-release@latest
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
with:
30+
tag_name: ${{ github.ref }}
31+
release_name: Release ${{ github.ref }}
32+
body: "${{ steps.changelog.outputs.content }}"
33+
draft: false
34+
prerelease: false
35+
36+
- name: build RPM package
37+
id: rpm_build
38+
uses: naveenrajm7/rpmbuild@master
39+
with:
40+
spec_file: "arctis-manager.rpm.spec"
41+
42+
- name: Upload Release Asset
43+
id: upload-release-asset
44+
uses: actions/upload-release-asset@v1
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
with:
48+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
49+
asset_path: ${{ steps.rpm_build.outputs.source_rpm_path }}
50+
asset_name: ${{ steps.rpm_build.outputs.source_rpm_name }}
51+
asset_content_type: ${{ steps.rpm_build.outputs.rpm_content_type }}

arctis-manager.rpm.spec

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Name: arctis-manager
2+
Version: 1.5
3+
Release: 1%{?dist}
4+
Summary: SteelSeries Arctis headset devices manager
5+
License: GNU GPL v3
6+
Requires: python >= 3.9, pulseaudio-utils
7+
8+
%description
9+
A replacement for SteelSeries GG software, to manage your Arctis device on Linux!
10+
11+
%prep
12+
# Clean for eventual python cache
13+
find . -name "__pycache__" | xargs rm -rf
14+
15+
%build
16+
# nothing in here
17+
18+
%install
19+
./install.sh
20+
21+
%files
22+
/usr/local/bin/arctis-manager
23+
/usr/local/lib/arctis-manager/*
24+
25+
%changelog
26+
# let's skip this for now

0 commit comments

Comments
 (0)