-
Notifications
You must be signed in to change notification settings - Fork 42
105 lines (91 loc) · 2.64 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Build Release
on:
schedule:
# Run every Monday at 12:00
- cron: 0 12 * * 1
workflow_dispatch:
push:
tags:
- "*"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
jobs:
dist:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest-8-cores
target: x86_64-pc-windows-msvc
- os: ubuntu-2004-8-cores
target: x86_64-unknown-linux-gnu
- os: macos-12-large
target: x86_64-apple-darwin
- os: macos-13-xlarge
target: aarch64-apple-darwin
name: Build release (${{ matrix.target }})
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
env:
DIST_TARGET_TRIPLE: ${{ matrix.target }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Rust toolchain
uses: dtolnay/[email protected]
with:
targets: ${{ matrix.target }}
- uses: extractions/setup-just@v1
with:
just-version: "1.23.0"
- name: Build
run: just dist
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: dist-${{ matrix.target }}
path: ./target/dist/
- name: Post to slack
uses: slackapi/[email protected]
if: ${{ always() }}
with:
payload: |
{
"text": "Build release binary result (${{ matrix.target }}): ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}
publish:
name: Publish
runs-on: ubuntu-latest
needs: ["dist"]
steps:
- uses: actions/download-artifact@v3
with:
name: dist-aarch64-apple-darwin
path: dist
- uses: actions/download-artifact@v3
with:
name: dist-x86_64-apple-darwin
path: dist
- uses: actions/download-artifact@v3
with:
name: dist-x86_64-unknown-linux-gnu
path: dist
- uses: actions/download-artifact@v3
with:
name: dist-x86_64-pc-windows-msvc
path: dist
- run: ls -al ./dist
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: releases
path: ./dist
- name: Post to slack
uses: slackapi/[email protected]
if: ${{ always() }}
with:
payload: |
{
"text": "Publish release binary result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}