Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Commit 703143f

Browse files
committed
chore: fix script
1 parent f2ae9d3 commit 703143f

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: release
33
on:
44
push:
55
tags:
6-
- "*"
6+
- '*'
77

88
jobs:
99
build-judger:
@@ -26,10 +26,11 @@ jobs:
2626
asset_name: natrium-windows-amd64.exe
2727
asset_name_2: navm-windows-amd64.exe
2828
- os: macos-latest
29-
artifact_name: natrium.exe
30-
artifact_name_2: navm.exe
29+
artifact_name: natrium
30+
artifact_name_2: navm
3131
asset_name: natrium-macos-amd64
3232
asset_name_2: navm-macos-amd64
33+
3334
runs-on: ${{ matrix.os }}
3435
steps:
3536
- uses: actions/checkout@v2
@@ -43,8 +44,8 @@ jobs:
4344
cargo build --frozen --release
4445
4546
- name: install musl tools
46-
if: ${{matrix.target_name == "x86_64-unknown-linux-musl"}}
47-
run: apt install musl musl-dev musl-tools
47+
if: ${{ matrix.target_name == 'x86_64-unknown-linux-musl' }}
48+
run: sudo apt update && sudo apt install musl musl-dev musl-tools
4849

4950
- name: Install rust target
5051
if: ${{ matrix.target_name != 0 }}
@@ -57,19 +58,26 @@ jobs:
5758
cargo fetch
5859
cargo build --frozen --release --target ${{ matrix.target_name }}
5960
61+
- uses: haya14busa/action-cond@v1
62+
id: condval
63+
with:
64+
cond: ${{ matrix.target_name != 0 }}
65+
if_true: target/${{matrix.target_name}}/release
66+
if_false: target/release
67+
6068
- name: Upload binaries to release
6169
uses: svenstaro/upload-release-action@v1-release
6270
with:
6371
repo_token: ${{ secrets.GITHUB_TOKEN }}
64-
file: target/release/${{ matrix.artifact_name }}
72+
file: ${{ steps.condval.outputs.value }}/${{ matrix.artifact_name }}
6573
asset_name: ${{ matrix.asset_name }}
6674
tag: ${{ github.ref }}
6775
overwrite: true
6876
- name: Upload binaries to release
6977
uses: svenstaro/upload-release-action@v1-release
7078
with:
7179
repo_token: ${{ secrets.GITHUB_TOKEN }}
72-
file: target/release/${{ matrix.artifact_name_2 }}
80+
file: ${{ steps.condval.outputs.value }}/${{ matrix.artifact_name_2 }}
7381
asset_name: ${{ matrix.asset_name_2 }}
7482
tag: ${{ github.ref }}
7583
overwrite: true

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
/target
2+
*.c0
3+
*.o0

0 commit comments

Comments
 (0)