Skip to content

Commit

Permalink
Update workflow for release
Browse files Browse the repository at this point in the history
  • Loading branch information
fxzxmicah committed Oct 26, 2024
1 parent 1e97a8b commit 95e55fe
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Build RPM
on:
- push

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -20,15 +23,27 @@ jobs:
dnf install -y dnf-plugins-core rpmdevtools &&
spectool --get-files --directory=SOURCES --all SPECS/*.spec &&
dnf builddep -y SPECS/*.spec &&
rpmbuild --define '_topdir /workspace' -ba SPECS/*.spec
rpmbuild --define '_topdir /workspace' -ba SPECS/*.spec &&
grep -i '^version' SPECS/*.spec | awk '{print \"Driver Ver: \" \$NF}' >> release.log &&
rpm -q --qf 'Kernel Ver: %{VERSION}-%{RELEASE}\n' kernel-devel >> release.log
"
- name: Set Variables
id: vars
run: |
echo "version=$(grep -i '^kernel' release.log | awk '{print $NF}')" >> $GITHUB_OUTPUT
- name: Check
run: |
ls -l BUILD/*
ls -l BUILD
cat release.log
- name: Upload Artifact
uses: actions/upload-artifact@v4
- name: Create Release
uses: softprops/action-gh-release@v2
with:
name: rpm-package
path: RPMS/
tag_name: ${{ steps.vars.outputs.version }}
body_path: release.log
files: RPMS/*
run: |
ls -l
ls -l RPMS

0 comments on commit 95e55fe

Please sign in to comment.