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
|
||||
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
|
||||
run: |
|
||||
cargo build -r
|
||||
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
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: cloudflare-dns-updater-linux-amd64
|
||||
path: cloudflare-dns-updater-linux-amd64
|
||||
name: release_blobs
|
||||
path: |
|
||||
cloudflare-dns-updater-linux-amd64
|
||||
cloudflare-dns-updater_${{ github.ref_name }}-1_amd64.deb
|
||||
if-no-files-found: error
|
||||
|
||||
upload-release:
|
||||
|
@ -73,25 +87,29 @@ jobs:
|
|||
name: Downloading All Build Artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
-
|
||||
name: Rearrange Artifact Paths
|
||||
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
|
||||
name: Upload Binary
|
||||
run: |
|
||||
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'
|
||||
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
|
||||
-
|
||||
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
|
||||
uses: actions/forgejo-release@v1
|
||||
with:
|
||||
direction: upload
|
||||
url: https://forgejo.neshweb.net
|
||||
release-dir: release
|
||||
release-dir: release_blobs
|
||||
token: ${{ secrets.FORGEJO_TOKEN }}
|
||||
tag: ${{ github.ref_name }}
|
Loading…
Reference in a new issue