-
Notifications
You must be signed in to change notification settings - Fork 136
48 lines (44 loc) · 1.35 KB
/
release_asset.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
# When the release is published, this workflow is automatically triggered,
# the move-related binaries are automatically packaged, and uploaded to
# the release's Assets
name: Release asset bot
on:
workflow_dispatch:
release:
types: [published]
jobs:
build:
name: Build release asset
continue-on-error: true
strategy:
fail-fast: false
matrix:
platform:
- ubuntu-latest
- ubuntu-18.04
- macos-latest
- windows-latest
runs-on: ${{matrix.platform}}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: install rust toolchain
uses: actions-rs/toolchain@v1
- name: build for ${{ matrix.platform }}
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: package move asset
run: bash ./scripts/package_asset.sh ${{ matrix.platform }}
- name: upload move asset
if: ${{ github.event_name == 'release'}}
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./move-${{ matrix.platform }}.zip
asset_name: move-${{ matrix.platform }}.zip
asset_content_type: application/zip