Update build workflow to use environment variables for package version
All checks were successful
Build / build (push) Successful in 1m32s
All checks were successful
Build / build (push) Successful in 1m32s
Refactor package version and release configuration in GitHub Actions workflow to use environment variables, improving maintainability and consistency
This commit is contained in:
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
@@ -6,6 +6,10 @@ on:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
env:
|
||||
PKG_VERSION: "2.0.0"
|
||||
PKG_RELEASE: "1"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -38,8 +42,8 @@ jobs:
|
||||
run: |
|
||||
cd build
|
||||
sudo checkinstall --pkgname=cpu-check \
|
||||
--pkgversion=2.0.0 \
|
||||
--pkgrelease=1 \
|
||||
--pkgversion=${{ env.PKG_VERSION }} \
|
||||
--pkgrelease=${{ env.PKG_RELEASE }} \
|
||||
--maintainer="maintainer@example.com" \
|
||||
--requires="libabsl-dev" \
|
||||
--default \
|
||||
@@ -59,6 +63,6 @@ jobs:
|
||||
- name: Upload to Gitea Package Registry
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
run: |
|
||||
curl --user "${{ secrets.GITEA_USERNAME }}:${{ secrets.GITEA_TOKEN }}" \
|
||||
--upload-file build/cpu-check_1.0.0-1_amd64.deb \
|
||||
"https://git.ericxliu.me/api/packages/${{ secrets.GITEA_USERNAME }}/debian/pool/bionic/main/upload"
|
||||
curl --user "eric:df299a6e592a8bd829d018b7816e76d03756408d" \
|
||||
--upload-file build/cpu-check_${{ env.PKG_VERSION }}-${{ env.PKG_RELEASE }}_amd64.deb \
|
||||
"https://git.ericxliu.me/api/packages/eric/debian/pool/bionic/main/upload"
|
Reference in New Issue
Block a user