From 34e299db24a6562885afae957ef1e80be5662271 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Wed, 16 Oct 2024 12:35:08 +0200 Subject: [PATCH 1/4] feat(ci): deb package on release --- .github/workflows/release.yml | 3 +++ Cargo.toml | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 50647188..8c8e007f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -67,12 +67,15 @@ jobs: # functionality based on whether this is a pull_request, and whether it's from a fork. # (PRs run on the *source* but secrets are usually on the *target* -- that's *good* # but also really annoying to build CI around when it needs secrets to work right.) + - name: Cargo Deb + run: cargo install cargo-deb - id: plan run: | cargo dist ${{ (!github.event.pull_request && format('host --steps=create --tag={0}', github.ref_name)) || 'plan' }} --output-format=json > plan-dist-manifest.json echo "cargo dist ran successfully" cat plan-dist-manifest.json echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT" + cargo deb --output="./target/distrib" - name: "Upload dist-manifest.json" uses: actions/upload-artifact@v4 with: diff --git a/Cargo.toml b/Cargo.toml index 5f74ad74..ae3f8235 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,9 +2,16 @@ name = "amber" version = "0.3.5-alpha" edition = "2021" -repository = "https://github.com/Ph0enixKM/Amber" +repository = "https://github.com/amber-lang/Amber" +homepage = "https://amber-lang.com/" +description = "The Programming Language compiled to Bash." rust-version = "1.79" +[package.metadata.deb] +maintainer = "Amber-Lang project" +license-file = "LICENSE.md" +copyright = "GPLv3" + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] From 5fe87d04d0ef648318f88ece9c1a4d293453be27 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Tue, 22 Oct 2024 18:35:49 +0200 Subject: [PATCH 2/4] fix(ci): debian package --- .github/workflows/release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8c8e007f..83cfd915 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -76,11 +76,13 @@ jobs: cat plan-dist-manifest.json echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT" cargo deb --output="./target/distrib" - - name: "Upload dist-manifest.json" + - name: "Upload dist-manifest.json and the Debian Package" uses: actions/upload-artifact@v4 with: name: artifacts-plan-dist-manifest - path: plan-dist-manifest.json + path: | + plan-dist-manifest.json + amber_*.deb # Build and packages all the platform-specific things build-local-artifacts: From d5097d7c57fe67ab294fbf368e3e2335b4f85e8c Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 25 Oct 2024 11:40:16 +0200 Subject: [PATCH 3/4] fix(ci): moved --- .github/workflows/release.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 83cfd915..6ca7ddc0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -67,15 +67,12 @@ jobs: # functionality based on whether this is a pull_request, and whether it's from a fork. # (PRs run on the *source* but secrets are usually on the *target* -- that's *good* # but also really annoying to build CI around when it needs secrets to work right.) - - name: Cargo Deb - run: cargo install cargo-deb - id: plan run: | cargo dist ${{ (!github.event.pull_request && format('host --steps=create --tag={0}', github.ref_name)) || 'plan' }} --output-format=json > plan-dist-manifest.json echo "cargo dist ran successfully" cat plan-dist-manifest.json echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT" - cargo deb --output="./target/distrib" - name: "Upload dist-manifest.json and the Debian Package" uses: actions/upload-artifact@v4 with: @@ -179,6 +176,10 @@ jobs: pattern: artifacts-* path: target/distrib/ merge-multiple: true + - name: Cargo Deb + run: | + cargo install cargo-deb + cargo deb --output="./target/distrib" - id: cargo-dist shell: bash run: | @@ -188,6 +189,8 @@ jobs: # Parse out what we just built and upload it to scratch storage echo "paths<> "$GITHUB_OUTPUT" jq --raw-output ".upload_files[]" dist-manifest.json >> "$GITHUB_OUTPUT" + AMBER_VERSION=$($AMBER --version) + echo "$PWD/target/distrib/amber_${AMBER_VERSION}-1_amd64.sh" >> "$GITHUB_OUTPUT" echo "EOF" >> "$GITHUB_OUTPUT" cp dist-manifest.json "$BUILD_MANIFEST_NAME" From b00497e3079462b04ceea42964e7372085829a8b Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 25 Oct 2024 11:41:43 +0200 Subject: [PATCH 4/4] fix(ci): moved --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8023ba37..5c4e681e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,7 +73,7 @@ jobs: echo "cargo dist ran successfully" cat plan-dist-manifest.json echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT" - - name: "Upload dist-manifest.json and the Debian Package" + - name: "Upload dist-manifest.json" uses: actions/upload-artifact@v4 with: name: artifacts-plan-dist-manifest