From 88f4bbff3a05ecfc0a0473ed7d1e982ba02776b5 Mon Sep 17 00:00:00 2001 From: Arszilla Date: Fri, 22 Aug 2025 00:10:39 +0300 Subject: [PATCH] Add GitHub Actions workflow --- .github/workflows/main.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..7170c54 --- /dev/null +++ b/.github/workflows/main.yml @@ -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