Skip to content

Commit 0cff306

Browse files
ci: fix release asset upload job
1 parent c9c1932 commit 0cff306

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

.github/workflows/upload-assets.yml

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: upload
22

33
on:
4+
push:
45
release:
56
types: [created]
7+
workflow_dispatch:
68

79
jobs:
810
build-release:
@@ -14,42 +16,40 @@ jobs:
1416
- build: linux-x86_64
1517
os: ubuntu-latest
1618
rust: nightly
19+
target: x86_64-unknown-linux-gnu
1720
- build: macos-x86_64
1821
os: macos-latest
1922
rust: nightly
23+
target: x86_64-apple-darwin
2024
- build: windows-x86_64-gnu
2125
os: windows-latest
2226
rust: nightly-x86_64-gnu
27+
target: x86_64-pc-windows-gnu
2328
- build: windows-x86_64-msvc
2429
os: windows-latest
2530
rust: nightly-x86_64-msvc
31+
target: x86_64-pc-windows-msvc
2632
runs-on: ${{ matrix.os }}
2733
steps:
2834
- uses: actions/checkout@v2
2935

30-
- name: Install Rust
31-
uses: actions-rs/toolchain@v1
32-
with:
33-
profile: minimal
34-
toolchain: ${{ matrix.rust }}
35-
override: true
36+
# Run build
37+
- name: install rustup
38+
run: |
39+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh
40+
sh rustup-init.sh -y --default-toolchain none
41+
rustup target add ${{ matrix.target }}
3642
3743
- name: Add mingw64 to path for x86_64-gnu
3844
run: echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH
3945
if: matrix.rust == 'nightly-x86_64-gnu'
4046
shell: bash
4147

42-
- name: Install cargo-make
43-
uses: actions-rs/cargo@v1
44-
with:
45-
command: install
46-
args: --force cargo-make
47-
4848
- name: Build release binaries
4949
uses: actions-rs/cargo@v1
5050
with:
51-
command: make
52-
args: release
51+
command: build
52+
args: --release
5353

5454
- name: Build archive
5555
shell: bash
@@ -70,6 +70,7 @@ jobs:
7070
fi
7171
7272
- name: Upload Release Asset
73+
if: github.event_name == 'release'
7374
uses: actions/upload-release-asset@v1
7475
env:
7576
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)