diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b9e34d4..3f7ca91 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -33,4 +47,4 @@ jobs: draft: false prerelease: false files: | - system-monitor_amd64.tar.gz \ No newline at end of file + system-monitor_musl_amd64.tar.gz \ No newline at end of file