-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-actions: Run the release process on GitHub actions
- Loading branch information
1 parent
e822fa5
commit 5535376
Showing
2 changed files
with
42 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Create Releases | ||
on: | ||
push: | ||
# Eventually run this only on release branches | ||
# branches: | ||
# - 'releases/**' | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_NET_GIT_FETCH_WITH_CLI: true | ||
|
||
jobs: | ||
release-linux: | ||
name: Release Linux | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libudev-dev libasound2-dev | ||
- name: Setup Rust toolchain | ||
run: rustup show | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.1' | ||
|
||
- name: Build Linux tool and create deb | ||
run: ./release/release.sh | ||
|
||
- name: Upload Linux deb | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: framework-inputmodule-rs-0.0.1.deb | ||
path: release/framework-inputmodule-rs-0.0.1.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,23 +10,23 @@ if [ $installed = 'false' ]; then | |
fi | ||
|
||
: 'Running the build' | ||
cargo build | ||
cargo build --target x86_64-unknown-linux-gnu -p inputmodule-control | ||
|
||
: "Packaging" | ||
fpm \ | ||
-s dir -t deb \ | ||
-p framework-inputmodule-rs-0.0.1.deb \ | ||
-p release/framework-inputmodule-rs-0.0.1.deb \ | ||
--name framework-inputmodule-rs \ | ||
--version 0.0.1 \ | ||
--architecture all \ | ||
--description "framework-inputmodule-rs runs Framework Laptop 16 input modules and keeps their firmware up to date" \ | ||
--url "https://frame.work" \ | ||
--maintainer "Framework <[email protected]>" \ | ||
--deb-systemd ./framework-inputmodule-rs.service \ | ||
--deb-systemd ./release/framework-inputmodule-rs.service \ | ||
--deb-systemd-enable \ | ||
--deb-systemd-auto-start \ | ||
--deb-systemd-restart-after-upgrade \ | ||
--after-install postinstall.sh \ | ||
--after-install ./release/postinstall.sh \ | ||
target/x86_64-unknown-linux-gnu/debug/inputmodule-control=/usr/bin/framework-inputmodule-rs | ||
|
||
: 'Packaging successful, install with "sudo dpkg -i <pkg-name>.deb"' |