Skip to content

Commit 2680eb5

Browse files
committed
CI build/upload fix
1 parent 1adb4b5 commit 2680eb5

1 file changed

Lines changed: 8 additions & 29 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,7 @@ permissions:
1111
jobs:
1212
build-and-upload:
1313
name: Build and upload
14-
runs-on: ${{ matrix.os }}
15-
16-
strategy:
17-
matrix:
18-
# You can add more, for any target you'd like!
19-
include:
20-
- build: windows
21-
os: windows-latest
22-
target: x86_64-pc-windows-msvc
14+
runs-on: windows-latest
2315

2416
steps:
2517
- name: Checkout
@@ -30,42 +22,29 @@ jobs:
3022
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
3123

3224
- name: Install Rust
33-
# Or @nightly if you want
3425
uses: dtolnay/rust-toolchain@stable
35-
# Arguments to pass in
3626
with:
37-
# Make Rust compile to our target (defined in the matrix)
38-
targets: ${{ matrix.target }}
27+
targets: x86_64-pc-windows-msvc
3928

4029
- name: Build
4130
uses: actions-rs/cargo@v1
4231
with:
4332
use-cross: false
4433
command: build
45-
args: --verbose --release --target ${{ matrix.target }}
34+
args: --verbose --release --target x86_64-pc-windows-msvc
4635

4736
- name: Build archive
4837
shell: bash
4938
run: |
50-
# Replace with the name of your binary
5139
binary_name="txcproxy"
5240
53-
dirname="$binary_name-${{ env.VERSION }}-${{ matrix.target }}"
41+
dirname="$binary_name-${{ env.VERSION }}"
5442
mkdir "$dirname"
55-
if [ "${{ matrix.os }}" = "windows-latest" ]; then
56-
mv "target/${{ matrix.target }}/release/$binary_name.exe" "$dirname"
57-
else
58-
mv "target/${{ matrix.target }}/release/$binary_name" "$dirname"
59-
fi
60-
61-
if [ "${{ matrix.os }}" = "windows-latest" ]; then
62-
7z a "$dirname.zip" "$dirname"
63-
echo "ASSET=$dirname.zip" >> $GITHUB_ENV
64-
else
65-
tar -czf "$dirname.tar.gz" "$dirname"
66-
echo "ASSET=$dirname.tar.gz" >> $GITHUB_ENV
67-
fi
43+
mv "target/${{ matrix.target }}/release/$binary_name.exe" "$dirname"
6844
45+
7z a "$dirname.zip" "$dirname"
46+
echo "ASSET=$dirname.zip" >> $GITHUB_ENV
47+
6948
- name: Release
7049
uses: softprops/action-gh-release@v1
7150
with:

0 commit comments

Comments
 (0)