Skip to content

Commit 7084be3

Browse files
authoredJul 12, 2024··
Merge pull request #35 from Umatriz/dev
Mod management. Java downloading.
2 parents 4a4328d + a0cc75e commit 7084be3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+5388
-2548
lines changed
 

‎.editorconfig

-12
This file was deleted.

‎.github/workflows/release.yml

+56-20
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,67 @@ on:
33
push:
44
tags:
55
- '*'
6+
7+
permissions:
8+
contents: write
9+
610
jobs:
711
publish:
8-
runs-on: ubuntu-latest
9-
permissions:
10-
contents: write
12+
name: Publish release
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
include:
19+
- build: linux-x86_64
20+
os: ubuntu-latest
21+
target: x86_64-unknown-linux-gnu
22+
- build: linux-aarch64
23+
os: ubuntu-latest
24+
target: aarch64-unknown-linux-gnu
25+
26+
- build: macos-x86_64
27+
os: macos-latest
28+
target: x86_64-apple-darwin
29+
- build: macos-aarch64
30+
os: macos-latest
31+
target: aarch64-apple-darwin
32+
33+
- build: windows-x86_64
34+
os: windows-latest
35+
target: x86_64-pc-windows-msvc
36+
1137
steps:
1238
- name: Clone project
1339
uses: actions/checkout@v4
14-
- name: Setup MinGW
15-
uses: egor-tensin/setup-mingw@v2.2.0
16-
- name: Setup GCC
17-
uses: egor-tensin/setup-gcc@v1.3
40+
1841
- name: Setup Rust
19-
run: |
20-
rustup default stable
21-
rustup target add x86_64-pc-windows-gnu
42+
uses: dtolnay/rust-toolchain@stable
43+
with:
44+
targets: ${{ matrix.target }}
45+
2246
- name: Build project
23-
run: cargo build --target x86_64-pc-windows-gnu --release && cargo build --release
24-
- name: Publish release
25-
uses: ghalactic/github-release-from-tag@v5
47+
uses: actions-rs/cargo@v1.0.1
48+
with:
49+
use-cross: true
50+
command: build
51+
args: --verbose --release --target ${{ matrix.target }}
52+
53+
- name: Make asset
54+
shell: bash
55+
run: |
56+
name="client-${{ matrix.target }}"
57+
if [ "${{ matrix.os }}" = "windows-latest" ]; then
58+
mv "target/${{ matrix.target }}/release/client.exe" "$name.exe"
59+
echo "ASSET=$name.exe" >> $GITHUB_ENV
60+
else
61+
mv "target/${{ matrix.target }}/release/client" "$name"
62+
echo "ASSET=$name" >> $GITHUB_ENV
63+
fi
64+
65+
- name:
66+
uses: softprops/action-gh-release@v1
2667
with:
27-
generateReleaseNotes: "true"
28-
prerelease: "false"
29-
assets: |
30-
- path: target/release/client
31-
name: client-linux
32-
- path: target/x86_64-pc-windows-gnu/release/client.exe
33-
name: client-windows.exe
68+
files: |
69+
${{ env.ASSET }}

0 commit comments

Comments
 (0)
Please sign in to comment.