Version 24.5.0.10342 #74
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build rpm packages | |
env: | |
app-name: 'smplayer' | |
output_dir: 'RPM/x86_64' | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { container: 'wachii/fedora-qt:34', qt: 5 } | |
- { container: 'wachii/opensuse-qt:15.3', qt: 5 } | |
runs-on: ubuntu-latest | |
container: ${{ matrix.config.container }} | |
steps: | |
- name: Install sources | |
uses: actions/checkout@v4 | |
with: | |
path: ${{ env.app-name }} | |
fetch-depth: 0 | |
- name: Download themes | |
if: ${{ env.app-name == 'smplayer' }} | |
run: | | |
wget https://sourceforge.net/projects/smplayer/files/SMPlayer-themes/20.11.0/smplayer-themes-20.11.0.tar.bz2 | |
wget https://sourceforge.net/projects/smplayer/files/SMPlayer-skins/20.11.0/smplayer-skins-20.11.0.tar.bz2 | |
- name: Get version | |
run: | | |
cd ${{ env.app-name }} | |
./get_version.sh | |
VERSION=`cat version` | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
sed -e "s/Version:.*/Version: $VERSION/" -i ${{ env.app-name }}.spec | |
#cat ${{ env.app-name }}.spec | |
- name: Prepare sources | |
run: | | |
mv ${{ env.app-name }} ${{ env.app-name }}-$VERSION | |
tar -cjf ${{ env.app-name }}-$VERSION.tar.bz2 ${{ env.app-name }}-$VERSION/ | |
- name: Build | |
run: | | |
rpmbuild -tb ${{ env.app-name }}-$VERSION.tar.bz2 --define "_rpmdir $(pwd)/RPM" | |
ls -l ${{ env.output_dir }} | |
cd ${{ env.output_dir }} | |
PACKAGEFILENAME=`ls ${{ env.app-name }}*.rpm` | |
echo "PACKAGEFILENAME=$PACKAGEFILENAME" >> $GITHUB_ENV | |
- name: Create artifact | |
if: github.event_name != 'release' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.PACKAGEFILENAME }} | |
path: ${{ env.output_dir }}/*.rpm | |
- name: Upload package to release | |
if: github.event_name == 'release' | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ${{ env.output_dir }}/*.rpm | |
tag: ${{ github.ref }} | |
overwrite: true | |
file_glob: true |