-
Notifications
You must be signed in to change notification settings - Fork 16
95 lines (85 loc) · 2.47 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
89
90
91
92
93
94
95
# Release workflow.
# It runs two jobs
# - build job which builds zephyr on: linux, macos and windows and uploads
# artifacts using `action/upload-artifact`.
# - release job which depends on completion of the previous job:
# * creata a new release using `actions/create-release`
# * downloads artifacts using `action/download-artifact`.
# * uploads artifacts to the release with `action/upload-release-asset`
# The last two actions are done for all three systems.
#
on:
push:
tags:
- 'v*'
workflow_dispatch:
name: Release Workflow
jobs:
build:
name: Release build
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: haskell/actions/setup@v1
with:
ghc-version: 9.2.7
cabal-version: 3.6.2.0
- name: Build zephyr
run: bash bundle/build.sh ${{ runner.os }}
- name: Upload tar file
uses: actions/upload-artifact@v2
with:
name: ${{ runner.os }}.tar.gz
path: bundle/${{ runner.os }}.tar.gz
- name: Upload sha file
uses: actions/upload-artifact@v2
with:
name: ${{ runner.os }}.sha
path: bundle/${{ runner.os }}.sha
release:
needs: [build]
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Download Linux.tar.gz
uses: actions/download-artifact@v2
with:
name: Linux.tar.gz
- name: Download Linux.sha
uses: actions/download-artifact@v2
with:
name: Linux.sha
- name: Download macOS.tar.gz
uses: actions/download-artifact@v2
with:
name: macOS.tar.gz
- name: Download macOS.sha
uses: actions/download-artifact@v2
with:
name: macOS.sha
- name: Download Windows.tar.gz
uses: actions/download-artifact@v2
with:
name: Windows.tar.gz
- name: Download Windows.sha
uses: actions/download-artifact@v2
with:
name: Windows.sha
- name: Create release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
name: Release ${{ github.ref }}
prerelease: false
draft: true
files: |
Linux.tar.gz
Linux.sha
macOS.tar.gz
macOS.sha
Windows.tar.gz
Windows.sha