Swap out hardcoded revision for Cargo.toml variable
All checks were successful
Run Tests on Code / run-tests (push) Successful in 12s
All checks were successful
Run Tests on Code / run-tests (push) Successful in 12s
This commit is contained in:
parent
846e07b56c
commit
9e3415f890
3 changed files with 9 additions and 4 deletions
|
@ -67,7 +67,10 @@ jobs:
|
|||
run: |
|
||||
cargo deb
|
||||
DEBIAN_REF=$(echo ${{ github.ref_name }} | tr - \~)
|
||||
mv target/debian/${{ github.event.repository.name }}_$DEBIAN_REF-1_amd64.deb dist/${{ github.event.repository.name }}_$DEBIAN_REF-1_amd64.deb
|
||||
echo "DEBIAN_REF=$DEBIAN_REF" >> dist/build.env
|
||||
DEBIAN_REV=-$(cat Cargo.toml | grep -E "(^|\|)version =" | cut -f2- -d= | tr -d \" | tr -d " ")
|
||||
echo "DEBIAN_REV=$DEBIAN_REV" >> dist/build.env
|
||||
mv target/debian/${{ github.event.repository.name }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb dist/${{ github.event.repository.name }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb
|
||||
-
|
||||
name: Uploading Build Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
|
@ -96,12 +99,12 @@ jobs:
|
|||
-
|
||||
name: Upload Debian Package
|
||||
run: |
|
||||
DEBIAN_REF=$(echo ${{ github.ref_name }} | tr - \~)
|
||||
source release_blobs/build.env
|
||||
echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
|
||||
--upload-file release_blobs/${{ github.event.repository.name }}_$DEBIAN_REF-1_amd64.deb \
|
||||
--upload-file release_blobs/${{ github.event.repository.name }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb \
|
||||
https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/debian/pool/bookworm/main/upload'
|
||||
curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
|
||||
--upload-file release_blobs/${{ github.event.repository.name }}_$DEBIAN_REF-1_amd64.deb \
|
||||
--upload-file release_blobs/${{ github.event.repository.name }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb \
|
||||
https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/debian/pool/bookworm/main/upload
|
||||
-
|
||||
name: Release New Version
|
||||
|
|
|
@ -6,6 +6,8 @@ edition = "2021"
|
|||
description = "Application for automatically updating Cloudflare DNS records"
|
||||
license = "GPL-3.0-or-later"
|
||||
|
||||
[package.metadata.deb]
|
||||
revision = "1"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
|
|
0
unit-scripts/cloudflare-dns-updater.service
Normal file
0
unit-scripts/cloudflare-dns-updater.service
Normal file
Loading…
Reference in a new issue