Skip to content

Deb path fix. RPM is very speculative. #8

Deb path fix. RPM is very speculative.

Deb path fix. RPM is very speculative. #8

Workflow file for this run

name: Build and Release DEB and RPM
permissions:
contents: write
on:
push:
tags:
- 'v*.*.*' # Semantic version tags
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: '3.28'
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y dpkg-dev rpm libvlc-dev vlc libvlccore-dev
- name: Build project
run: |
mkdir build
cd build
cmake ..
make
- name: Build DEB package
run: |
mkdir -p build/rpm/usr/lib/x86_64-linux-gnu/vlc/plugins/misc
cp lib/libxattrplaying_plugin.so build/debian/usr/lib/x86_64-linux-gnu/vlc/plugins/misc/
cd build
dpkg-deb --build debian xattrplaying_plugin_${GITHUB_REF#refs/tags/}.deb
- name: Build RPM package
run: |
mkdir -p build/rpm/usr/lib/x86_64-linux-gnu/vlc/plugins/misc
cp lib/libxattrplaying_plugin.so build/rpm/usr/lib/x86_64-linux-gnu/vlc/plugins/misc/
fpm -s dir -t rpm -n xattrplaying_plugin -v ${GITHUB_REF#refs/tags/} --prefix /usr build/rpm
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload DEB package to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/xattrplaying_plugin_${GITHUB_REF#refs/tags/}.deb
asset_name: xattrplaying_plugin_${GITHUB_REF#refs/tags/}.deb
asset_content_type: application/vnd.debian.binary-package
- name: Upload RPM package to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/xattrplaying_plugin-${GITHUB_REF#refs/tags/}-1.x86_64.rpm
asset_name: xattrplaying_plugin-${GITHUB_REF#refs/tags/}-1.x86_64.rpm
asset_content_type: application/x-rpm