-
Notifications
You must be signed in to change notification settings - Fork 27
64 lines (51 loc) · 1.57 KB
/
build_windows_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Windows
on:
create: # when someone creates a Git reference (Git branch or tag)
workflow_dispatch:
# push:
# branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: windows-latest
env:
APP_NAME: ethertia
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, rust-src, clippy
- name: Install Dependencies
run: |
#rustup target add x86_64-pc-windows-msvc # Windows
- name: Build for Windows
run: |
cargo build --release --target x86_64-pc-windows-msvc
- name: Zip Windows Artifact
run: Compress-Archive -Path ./target/x86_64-pc-windows-msvc/release/*.exe -Destination windows-x86_64.zip
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: windows-artifacts
path: |
./windows-x86_64.zip
./target/x86_64-pc-windows-msvc/release/${APP_NAME}.exe
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# body: |
# This is the release of ${APP_NAME}.
# draft: false
# prerelease: true