Add Debian packaging to the App #32
1 changed files with 31 additions and 13 deletions
|
@ -51,17 +51,31 @@ jobs:
|
||||||
-
|
-
|
||||||
name: Checking Out Repository Code
|
name: Checking Out Repository Code
|
||||||
uses: https://code.forgejo.org/actions/checkout@v3
|
uses: https://code.forgejo.org/actions/checkout@v3
|
||||||
|
-
|
||||||
|
name: Installing cargo-deb dependencies
|
||||||
|
run: apt install -y liblzma-dev
|
||||||
|
-
|
||||||
|
name: Installing cargo-deb
|
||||||
|
run: |
|
||||||
|
cargo install cargo-deb
|
||||||
-
|
-
|
||||||
name: Compiling To Linux Target
|
name: Compiling To Linux Target
|
||||||
run: |
|
run: |
|
||||||
cargo build -r
|
cargo build -r
|
||||||
mv target/release/cloudflare-dns-updater cloudflare-dns-updater-linux-amd64
|
mv target/release/cloudflare-dns-updater cloudflare-dns-updater-linux-amd64
|
||||||
|
-
|
||||||
|
name: Bundle .deb package
|
||||||
|
run: |
|
||||||
|
cargo deb
|
||||||
|
mv target/debian/cloudflare-dns-updater_${{ github.ref_name }}-1_amd64.deb cloudflare-dns-updater_${{ github.ref_name }}-1_amd64.deb
|
||||||
-
|
-
|
||||||
name: Uploading Build Artifact
|
name: Uploading Build Artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: cloudflare-dns-updater-linux-amd64
|
name: release_blobs
|
||||||
path: cloudflare-dns-updater-linux-amd64
|
path: |
|
||||||
|
cloudflare-dns-updater-linux-amd64
|
||||||
|
cloudflare-dns-updater_${{ github.ref_name }}-1_amd64.deb
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
upload-release:
|
upload-release:
|
||||||
|
@ -73,25 +87,29 @@ jobs:
|
||||||
name: Downloading All Build Artifacts
|
name: Downloading All Build Artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
-
|
-
|
||||||
name: Rearrange Artifact Paths
|
name: Upload Binary
|
||||||
run: |
|
|
||||||
mkdir release
|
|
||||||
mv cloudflare-dns-updater-linux-amd64/cloudflare-dns-updater-linux-amd64 release/cloudflare-dns-updater-linux-amd64
|
|
||||||
-
|
|
||||||
name: Upload Artifacts As Generic Packages
|
|
||||||
run: |
|
run: |
|
||||||
echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
|
echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
|
||||||
--upload-file release/cloudflare-dns-updater-linux-amd64 \
|
--upload-file release_blobs/cloudflare-dns-updater-linux-amd64 \
|
||||||
https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/generic/${{ github.event.repository.name }}/${{ github.ref_name }}/chellaris-rust-api-linux-amd64'
|
https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/generic/${{ github.event.repository.name }}/${{ github.ref_name }}/chellaris-rust-api-linux-amd64'
|
||||||
curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
|
curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
|
||||||
--upload-file release/cloudflare-dns-updater-linux-amd64 \
|
--upload-file release_blobs/cloudflare-dns-updater-linux-amd64 \
|
||||||
https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/generic/${{ github.event.repository.name }}/${{ github.ref_name }}/chellaris-rust-api-linux-amd64
|
https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/generic/${{ github.event.repository.name }}/${{ github.ref_name }}/chellaris-rust-api-linux-amd64
|
||||||
|
-
|
||||||
|
name: Upload Debian Package
|
||||||
|
run: |
|
||||||
|
echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
|
||||||
|
--upload-file release_blobs/cloudflare-dns-updater_${{ github.ref_name }}-1_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/cloudflare-dns-updater_${{ github.ref_name }}-1_amd64.deb \
|
||||||
|
https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/debian/pool/bookworm/main/upload
|
||||||
-
|
-
|
||||||
name: Release New Version
|
name: Release New Version
|
||||||
uses: actions/forgejo-release@v1
|
uses: actions/forgejo-release@v1
|
||||||
with:
|
with:
|
||||||
direction: upload
|
direction: upload
|
||||||
url: https://forgejo.neshweb.net
|
url: https://forgejo.neshweb.net
|
||||||
release-dir: release
|
release-dir: release_blobs
|
||||||
token: ${{ secrets.FORGEJO_TOKEN }}
|
token: ${{ secrets.FORGEJO_TOKEN }}
|
||||||
tag: ${{ github.ref_name }}
|
tag: ${{ github.ref_name }}
|
Loading…
Reference in a new issue