-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (66 loc) · 1.92 KB
/
publish.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
name: Publish
on:
push:
tags:
- "*"
branches:
- master
pull_request:
jobs:
create-assets:
name: release ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
target:
- x86_64-pc-windows-msvc
- i686-pc-windows-msvc
- x86_64-unknown-linux-musl
- x86_64-apple-darwin
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
archive: zip
- os: windows-latest
target: i686-pc-windows-msvc
archive: zip
- os: windows-latest
target: x86_64-pc-windows-msvc
archive: zip
- os: macos-latest
target: x86_64-apple-darwin
archive: zip
steps:
- uses: actions/checkout@master
- name: Compile and release
uses: rust-build/rust-build.action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
RUSTTARGET: ${{ matrix.target }}
EXTRA_FILES: "README.md"
SRC_DIR: "hello"
ARCHIVE_TYPES: ${{ matrix.archive }}
PRE_BUILD: "pre_build.sh"
POST_BUILD: "test/post_build.sh"
MINIFY: "yes"
# - uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: stable-${{ matrix.target }}
# target: ${{ matrix.target }}
# default: true
# override: true
# - uses: actions-rs/cargo@v1
# with:
# command: build
# args: --release
# - uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.get_release_info.outputs.upload_url }}
# asset_path: ${{ matrix.asset_path }}
# asset_name: ${{ matrix.asset_name }}
# asset_content_type: application/octet-stream