-
Notifications
You must be signed in to change notification settings - Fork 10
87 lines (86 loc) · 2.83 KB
/
runtime_release_win.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
on:
release:
types: [created]
workflow_dispatch:
name: Runtime Release Win
jobs:
blockless_runtime:
strategy:
matrix:
include:
- build: windows
os: windows-latest
rust: stable
target: x86_64-pc-windows-msvc
arch: x86_64
# - build: windows
# os: windows-latest
# rust: stable
# target: aarch64-pc-windows-msvc
# arch: aarch64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Edit Toml
uses: dmikey/toml-editor@master
with:
file: "bls-runtime/Cargo.toml"
key: "version"
value: "${{ steps.get_release.outputs.tag_name }}"
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
- run: cargo build --release --all-features --target ${{ matrix.target }}
env:
TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: gcc-10-aarch64-linux-gnu
- name: Remove File
uses: JesseTG/[email protected]
with:
path: target/${{ matrix.target }}/release/.fingerprint
- name: Remove File
uses: JesseTG/[email protected]
with:
path: target/${{ matrix.target }}/release/examples
- name: Remove File
uses: JesseTG/[email protected]
with:
path: target/${{ matrix.target }}/release/build
- name: Remove File
uses: JesseTG/[email protected]
with:
path: target/${{ matrix.target }}/release/incremental
- name: Remove File
uses: JesseTG/[email protected]
with:
path: target/${{ matrix.target }}/release/examples
- name: Remove File
uses: JesseTG/[email protected]
with:
path: target/${{ matrix.target }}/release/deps
- name: Remove Files
run: |
rm target/${{ matrix.target }}/release/*.d
rm target/${{ matrix.target }}/release/*.rlib
rm target/${{ matrix.target }}/release/*.pdb
- name: Archive Release
uses: thedoctor0/zip-release@main
with:
type: "tar"
filename: ../../../blockless-runtime.${{ matrix.os }}.${{ matrix.arch }}.tar.gz
directory: target/${{ matrix.target }}/release
path: .
- name: upload artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: blockless-runtime.${{ matrix.os }}.${{ matrix.arch }}.tar.gz
asset_name: blockless-runtime.${{ matrix.os }}.${{ matrix.arch }}.tar.gz
asset_content_type: application/gzip