Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): deb package on release #518

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: artifacts-plan-dist-manifest
path: plan-dist-manifest.json
path: |
plan-dist-manifest.json
amber_*.deb
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we add it here before compiling the package?


# Build and packages all the platform-specific things
build-local-artifacts:
Expand Down Expand Up @@ -174,7 +176,10 @@ jobs:
pattern: artifacts-*
path: target/distrib/
merge-multiple: true

- name: Cargo Deb
run: |
cargo install cargo-deb
cargo deb --output="./target/distrib"
- name: Compile installer/uninstaller
run: |
TARGET_TRIPLE="$(rustc -Vv | awk '/^host/ { print $2 }')"
Expand All @@ -192,6 +197,8 @@ jobs:
# Parse out what we just built and upload it to scratch storage
echo "paths<<EOF" >> "$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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I though that you're going to put the path to the .deb file here. What is amber_*-1_amb64.sh?

echo "$PWD/target/distrib/install.sh" >> "$GITHUB_OUTPUT"
echo "$PWD/target/distrib/uninstall.sh" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
Expand Down
9 changes: 8 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down