chore: install systemd service as non-executable (#218) #152
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, fedora-38, fedora-39, arch] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install pkger | |
run: | | |
curl -L -o /tmp/pkger.deb https://github.com/vv9k/pkger/releases/download/0.11.0/pkger-0.11.0-0.amd64.deb | |
sudo apt -y install /tmp/pkger.deb | |
- name: Build packages | |
run: pkger -c .pkger.yml build lact -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: 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/[email protected] | |
with: | |
removeArtifacts: true | |
allowUpdates: true | |
artifactErrorsFailBuild: true | |
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 | |