Skip to content

Commit f54a36d

Browse files
committed
fix: package upload and source rpm download
1 parent 86f3223 commit f54a36d

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.github/workflows/source-tarball.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,27 @@ jobs:
1212
- uses: actions/checkout@v4
1313

1414
- name: Create versioned tarball
15+
id: create-tarball
1516
run: |
1617
cd rpm && make tarball
18+
echo "tarball_name=$(ls python3-badfish-*.tar.gz | head -n1)" >> $GITHUB_OUTPUT
19+
echo "version=$(ls python3-badfish-*.tar.gz | sed 's/python3-badfish-\(.*\)\.tar\.gz/\1/')" >> $GITHUB_OUTPUT
20+
working-directory: rpm
1721

1822
- name: Upload artifact
1923
uses: actions/upload-artifact@v4
2024
with:
2125
name: source-tarball
2226
path: rpm/python3-badfish-*.tar.gz
27+
28+
- name: Create Release
29+
id: create_release
30+
uses: softprops/action-gh-release@v1
31+
with:
32+
tag_name: v${{ steps.create-tarball.outputs.version }}
33+
name: Release ${{ steps.create-tarball.outputs.version }}
34+
files: rpm/${{ steps.create-tarball.outputs.tarball_name }}
35+
draft: false
36+
prerelease: false
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

rpm/python3-badfish.spec.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Summary: %{sum}
1414

1515
License: GPL-3.0-or-later and MIT
1616
URL: https://github.com/%{org}/%{project}
17-
Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
17+
Source: %{url}/releases/download/v%{version}/python3-badfish-%{version}.tar.gz
1818

1919
BuildArch: noarch
2020
BuildRequires: %{py3_dist setuptools}

0 commit comments

Comments
 (0)