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