-
-
Notifications
You must be signed in to change notification settings - Fork 42
77 lines (70 loc) · 2.48 KB
/
release.yaml
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
name: release-flow
# https://help.github.com/en/articles/events-that-trigger-workflows#release-event-release
# on: release
on:
workflow_dispatch:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+*"
permissions:
contents: write
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
build:
runs-on: ${{ matrix.os.imageName }}
strategy:
matrix:
rust_toolchain: ["stable"]
os:
- target_platform: x86_64-unknown-linux-gnu
imageName: ubuntu-latest
cross: "true"
- target_platform: x86_64-unknown-linux-musl
imageName: ubuntu-latest
cross: "true"
- target_platform: aarch64-unknown-linux-musl
imageName: ubuntu-latest
cross: "true"
- target_platform: x86_64-apple-darwin
imageName: "macOS-latest"
- target_platform: aarch64-apple-darwin
imageName: "macOS-latest"
- target_platform: x86_64-pc-windows-msvc
imageName: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust_toolchain }}
targets: ${{ matrix.os.target_platform }}
- uses: mozilla-actions/[email protected]
- uses: davidB/rust-cargo-make@v1
- name: Make zip-release-ci-flow
id: zip-release-ci-flow
run: cargo make --disable-check-for-updates zip-release-ci-flow
env:
TARGET: ${{ matrix.os.target_platform }}
CROSS: ${{ matrix.os.cross }}
# DEVELOPER_DIR: "/Applications/Xcode_11.app/Contents/Developer"
- name: Upload binaries to release
# if: startsWith(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.zip-release-ci-flow.outputs.dist_file_path }}
# asset_name: ${{ steps.zip-release-ci-flow.outputs.dist_file_name }}
# tag: ${{ github.ref }}
tag: ${{ steps.zip-release-ci-flow.outputs.dist_version }}
prerelease: false # ${{ github.ref == format('refs/tags/{0}', steps.zip-release-ci-flow.outputs.dist_version) }}
overwrite: true
- run: ${SCCACHE_PATH} --show-stats
shell: bash
krew-update:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update new version in krew-index
uses: rajatjindal/[email protected]