Add GitHub Actions workflow

This commit is contained in:
Arszilla 2025-08-22 00:10:39 +03:00
parent 9a6b31e082
commit 88f4bbff3a
No known key found for this signature in database

39
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,39 @@
name: Build and release package
on:
push:
tags:
- "v*"
jobs:
build:
name: Build and release package
runs-on: ubuntu-latest
outputs:
package_version: ${{ steps.get_version.outputs.PACKAGE_VERSION }}
steps:
- name: Checkout repository
id: checkout_repository
uses: actions/checkout@v4
- name: Build package
id: build_package
uses: jtdor/build-deb-action@v1
env:
DEB_BUILD_OPTIONS: noautodbgsym
with:
buildpackage-opts: -us -uc -b
- name: Get package version
id: get_version
run: echo "PACKAGE_VERSION=$(echo debian/artifacts/fake-proxmox-subscription_*_all.deb | awk -F'[_]' '{ print $2 }')" >> $GITHUB_OUTPUT
- name: Publish release
id: publish_release
uses: ncipollo/release-action@v1
if: github.ref_type == 'tag'
with:
name: v${{ steps.get_version.outputs.package_version }}
artifacts: debian/artifacts/fake-proxmox-subscription_${{ steps.get_version.outputs.package_version }}_all.deb