Skip to content

Commit

Permalink
Add release
Browse files Browse the repository at this point in the history
  • Loading branch information
mrauhala authored Nov 29, 2024
1 parent 56522d8 commit 5d5dc5f
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Build RPM Packages
on:
push:
branches: [ master ]
tags:
- 'v*'
pull_request:
branches: [ master ]
workflow_dispatch:
Expand Down Expand Up @@ -43,16 +45,11 @@ jobs:
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
mkdir -p ~/rpmbuild/SOURCES/smartmet-data-models
cp ./*.spec ~/rpmbuild/SPECS/
# Copy source files to SOURCES directory
# Assuming your source files are in the root of the repository
# Modify this according to your project structure
cp -r ./* ~/rpmbuild/SOURCES/smartmet-data-models
- name: Build RPM package
run: |
cd ~/rpmbuild/SPECS
# Replace package.spec with your actual spec file name
rpmbuild -ba *.spec
- name: List generated RPMs
Expand All @@ -68,3 +65,21 @@ jobs:
~/rpmbuild/RPMS/
~/rpmbuild/SRPMS/
retention-days: 7

create-release:
needs: build-rpms
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: artifacts/**/*
generate_release_notes: true

0 comments on commit 5d5dc5f

Please sign in to comment.