Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Publish for systemd-sysupdate #3

Publish for systemd-sysupdate

Publish for systemd-sysupdate #3

Workflow file for this run

name: CI
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: sudo apt install -y ninja-build
- uses: actions/checkout@v4
- run: make
- uses: actions/upload-artifact@v4
with:
name: 'sysext'
path: 'sysext.raw'
release:
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: 'sysext'
- run: |
repository="${{ github.repository }}"
repository_name="${repository#*/}"
package_name="${repository_name#*-}"
mv sysext.raw "${package_name}-${{ github.ref_name }}.raw"
sha256sum *.raw > SHA256SUMS
cat << EOF > "${package_name}.conf"
[Transfer]
Verify=false
[Source]
Type=url-file
Path=https://github.com/${{ github.repository }}/releases/latest/download/
MatchPattern=${package_name}[email protected]
[Target]
InstancesMax=3
Type=regular-file
Path=/opt/extensions/${package_name}
CurrentSymlink=/etc/extensions/${package_name}.raw
EOF
- uses: softprops/action-gh-release@v1
with:
name: Release ${{ github.ref_name }}
files: |
SHA256SUMS
*.raw
*.conf