mirror of
https://github.com/Jamesits/pve-fake-subscription
synced 2025-12-07 11:36:59 -05:00
Add GitHub Actions workflow
This commit is contained in:
parent
9a6b31e082
commit
88f4bbff3a
39
.github/workflows/main.yml
vendored
Normal file
39
.github/workflows/main.yml
vendored
Normal 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
|
||||
Loading…
Reference in New Issue
Block a user