pkg: add ubuntu 24.04 package #388
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 packages | |
on: | |
push: | |
branches: ['master'] | |
pull_request: | |
jobs: | |
build-packages: | |
strategy: | |
matrix: | |
target-os: [ debian-12, ubuntu-2204, ubuntu-2404, fedora-39, fedora-40, arch, opensuse-tumbleweed ] | |
recipe: [ lact, lact-headless ] | |
include: | |
- target-os: fedora-39 | |
recipe: lact-libadwaita | |
- target-os: fedora-40 | |
recipe: lact-libadwaita | |
- target-os: arch | |
recipe: lact-libadwaita | |
- target-os: opensuse-tumbleweed | |
recipe: lact-libadwaita | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Import gpg key | |
run: | | |
echo -n "$GPG_KEY" | base64 -d > /tmp/package-signing-key.gpg | |
echo -n "$GPG_KEY" | base64 -d | gpg --import || true | |
env: | |
GPG_KEY: ${{ secrets.GPG_KEY }} | |
- name: Install pkger | |
run: | | |
curl -L -o /usr/local/bin/pkger https://github.com/ilya-zlobintsev/pkger/releases/download/v0.11.1/pkger | |
chmod +x /usr/local/bin/pkger | |
- name: Build packages (with signing) | |
if: ${{ contains(matrix.target-os, 'fedora') }} | |
run: pkger -t -c .pkger.yml build ${{ matrix.recipe }} -i ${{ matrix.target-os }} | |
env: | |
GPG_KEY_PASSWORD: ${{ secrets.GPG_KEY_PASSWORD }} | |
- name: Build packages (without signing) | |
if: ${{ !contains(matrix.target-os, 'fedora') }} | |
run: pkger -t -c .pkger.yml build --no-sign ${{ matrix.recipe }} -i ${{ matrix.target-os }} | |
- name: Copy release files | |
run: | | |
OUT_DIR=$PWD/release-artifacts | |
mkdir -p $OUT_DIR | |
pushd pkg/output | |
for DISTRO in $(ls); do | |
cd $DISTRO | |
rm -f *.src.rpm | |
for FILE in $(ls); do | |
NAME="${FILE%.*}" | |
EXT="${FILE##*.}" | |
OUT_NAME="$OUT_DIR/$NAME.$DISTRO.$EXT" | |
cp $FILE $OUT_NAME | |
done | |
cd .. | |
done | |
popd | |
- name: Save gpg key | |
run: | | |
gpg --armor --export > $PWD/release-artifacts/lact.pubkey | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.target-os }} | |
path: release-artifacts/* | |
create-release: | |
needs: build-packages | |
runs-on: ubuntu-latest | |
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: downloaded-artifacts/ | |
- name: Create release | |
uses: ncipollo/release-action@v1.12.0 | |
with: | |
removeArtifacts: true | |
allowUpdates: true | |
artifactErrorsFailBuild: false | |
artifacts: "downloaded-artifacts/*/*" | |
body: ${{ github.event.head_commit.message }} | |
prerelease: true | |
name: Test release | |
tag: test-build | |
- name: Update test-build tag | |
run: | | |
git tag -f test-build | |
git push -f origin test-build | |
shell: bash | |