-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa73e31
commit 02ed5d6
Showing
3 changed files
with
43 additions
and
0 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: Build | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: build docker base image | ||
run: docker build -t rust-compile-image . | ||
|
||
- name: Run the build process with Docker | ||
uses: addnab/docker-run-action@v3 | ||
with: | ||
image: rust-compile-image | ||
options: -v "${{ github.workspace }}":/usr/src/myapp -w /usr/src/myapp | ||
run: | | ||
cargo build --release | ||
cargo generate-rpm | ||
cargo deb | ||
- name: Save RPM / DEB name | ||
run: | | ||
echo "rpm_name=$(ls target/generate-rpm/)" >> "$GITHUB_ENV" | ||
echo "deb_name=$(ls target/debian/ -I *-stripped)" >> "$GITHUB_ENV" | ||
- name: Upload RPM | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: target/generate-rpm/ | ||
name: ${{ env.rpm_name }} | ||
|
||
- name: Upload Deb | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: target/debian/${{ env.deb_name }} | ||
name: ${{ env.deb_name }} |
File renamed without changes.
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,5 @@ | ||
# Use the latest official Rust | ||
FROM rust:latest | ||
|
||
# install dependencies | ||
RUN cargo install cargo-generate-rpm cargo-deb |