Skip to content

Commit

Permalink
change action build
Browse files Browse the repository at this point in the history
  • Loading branch information
xml committed Apr 15, 2024
1 parent 8215730 commit e7fead9
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,26 @@ jobs:
uses: actions/checkout@v2

- name: Build
run: cargo build --release
run: |
rustup target add x86_64-unknown-linux-musl
cargo build --release --target x86_64-unknown-linux-musl
- name: Get previous commit
uses: actions/github-script@v4
with:
script: |
const commits = await github.repos.listCommits({
owner: context.repo.owner,
repo: context.repo.repo,
per_page: 2
});
const previousCommit = commits.data[1].sha;
console.log(previousCommit);
- name: Zip the Build
run: |
ls target/release
tar cvzf system-monitor_amd64.tar.gz ./target/release/system-monitor
tar cvzf system-monitor_musl_amd64.tar.gz -C ./target/x86_64-unknown-linux-musl/release system-monitor
- name: Create Release
uses: softprops/action-gh-release@v2
Expand All @@ -33,4 +47,4 @@ jobs:
draft: false
prerelease: false
files: |
system-monitor_amd64.tar.gz
system-monitor_musl_amd64.tar.gz

0 comments on commit e7fead9

Please sign in to comment.