-
Notifications
You must be signed in to change notification settings - Fork 5
88 lines (81 loc) · 2.3 KB
/
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
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
88
name: Release
on:
workflow_dispatch:
env:
CARGO_INCREMENTAL: 0
permissions:
contents: write
jobs:
setup-environment:
uses: ./.github/workflows/setup-environment.yml
lint:
needs: setup-environment
uses: ./.github/workflows/lint.yml
with:
cache-key: ${{ needs.setup-environment.outputs.cargo_cache_key }}
test:
needs: setup-environment
uses: ./.github/workflows/test.yml
with:
cache-key: ${{ needs.setup-environment.outputs.cargo_cache_key }}
tag-release:
needs:
- setup-environment
- lint
- test
uses: ./.github/workflows/tag-release.yml
with:
git_tag_name: ${{ needs.setup-environment.outputs.git_tag_name }}
secrets:
RELEASE: ${{ secrets.RELEASE }}
create-release:
needs:
- setup-environment
- tag-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
ref: 'refs/tags/${{ needs.setup-environment.outputs.git_tag_name }}'
changelog: CHANGELOG.md
token: ${{ secrets.GITHUB_TOKEN }}
release:
needs:
- setup-environment
- create-release
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: i686-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: i686-unknown-linux-musl
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: universal-apple-darwin
os: macos-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/upload-rust-binary-action@v1
with:
ref: refs/tags/${{ needs.setup-environment.outputs.git_tag_name }}
bin: tinty
target: ${{ matrix.target }}
token: ${{ secrets.GITHUB_TOKEN }}
checksum: sha256
publish-crate:
needs: release
uses: ./.github/workflows/publish-crate.yml
secrets:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}