-
Notifications
You must be signed in to change notification settings - Fork 0
189 lines (183 loc) · 6.68 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
name: Release
on:
push:
tags:
- v*
jobs:
# No. OS ARCH COMPILER
# 2. Windows x86 ldc
# 6. Windows x86_64 ldc
# 14. Ubuntu x86_64 ldc
# 22. macOS x86_64 ldc
# No. OS ARCH COMPILER
# 2. Windows x86 ldc
create-windows-x86:
name: create-windows-x86
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ldc-latest
- name: Build binary
run: dub build -a=x86 -b=release -c=default
- name: Create archive
id: create_archive
run: rdmd ./scripts/runner.d -a=x86 --mode=create-archive
- name: Upload created archive
uses: actions/upload-artifact@v1
with:
name: windows-x86-binary
path: ${{ steps.create_archive.outputs.ARCNAME }}
# No. OS ARCH COMPILER
# 6. Windows x86_64 ldc
create-windows-x86_64:
name: create-windows-x86_64
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ldc-latest
- name: Build binary
run: dub build -a=x86_64 -b=release -c=default
- name: Create archive
id: create_archive
run: rdmd ./scripts/runner.d -a=x86_64 --mode=create-archive
- name: Upload created archive
uses: actions/upload-artifact@v1
with:
name: windows-x86_64-binary
path: ${{ steps.create_archive.outputs.ARCNAME }}
# No. OS ARCH COMPILER
# 14. Ubuntu x86_64 ldc
create-linux-x86_64:
name: create-linux-x86_64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ldc-latest
- name: Build bianry
run: dub build -a=x86_64 -b=release -c=default
- name: Create archive
id: create_archive
run: rdmd ./scripts/runner.d -a=x86_64 --mode=create-archive
- name: Generate document
run: rdmd ./scripts/runner.d -a=x86_64 --mode=generate-document
- name: Upload created archive
uses: actions/upload-artifact@v1
with:
name: linux-x86_64-binary
path: ${{ steps.create_archive.outputs.ARCNAME }}
- name: Upload generated pages
uses: actions/upload-artifact@v1
with:
name: docs
path: docs
# No. OS ARCH COMPILER
# 22. macOS x86_64 ldc
create-osx-x86_64:
name: create-osx-x86_64
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ldc-latest
- name: Build binary
run: dub build -a=x86_64 -b=release -c=default
- name: Create archive
id: create_archive
run: rdmd ./scripts/runner.d -a=x86_64 --mode=create-archive
- name: Upload created archive
uses: actions/upload-artifact@v1
with:
name: osx-x86_64-binary
path: ${{ steps.create_archive.outputs.ARCNAME }}
# Deploy Pages
create-release:
name: create-release
needs: [create-windows-x86, create-windows-x86_64, create-linux-x86_64, create-osx-x86_64]
runs-on: ubuntu-latest
steps:
- name: Get Names
id: get_names
run: |
echo ::set-output name=TAGNAME::${GITHUB_REF#refs/tags/}
echo ::set-output name=PROJNAME::${GITHUB_REPOSITORY#$GITHUB_ACTOR/}
- name: Download windows-x86-binary
uses: actions/download-artifact@v1
with:
name: windows-x86-binary
path: ./
- name: Download windows-x86_64-binary
uses: actions/download-artifact@v1
with:
name: windows-x86_64-binary
path: ./
- name: Download linux-x86_64-binary
uses: actions/download-artifact@v1
with:
name: linux-x86_64-binary
path: ./
- name: Download osx-x86_64-binary
uses: actions/download-artifact@v1
with:
name: osx-x86_64-binary
path: ./
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset Win32
id: upload-release-asset-win32
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.get_names.outputs.PROJNAME }}-${{ steps.get_names.outputs.TAGNAME }}-windows-x86.zip
asset_name: ${{ steps.get_names.outputs.PROJNAME }}-${{ steps.get_names.outputs.TAGNAME }}-windows-x86.zip
asset_content_type: application/zip
- name: Upload Release Asset Win64
id: upload-release-asset-win64
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.get_names.outputs.PROJNAME }}-${{ steps.get_names.outputs.TAGNAME }}-windows-x86_64.zip
asset_name: ${{ steps.get_names.outputs.PROJNAME }}-${{ steps.get_names.outputs.TAGNAME }}-windows-x86_64.zip
asset_content_type: application/zip
- name: Upload Release Asset Linux
id: upload-release-asset-linux
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.get_names.outputs.PROJNAME }}-${{ steps.get_names.outputs.TAGNAME }}-linux-x86_64.tar.gz
asset_name: ${{ steps.get_names.outputs.PROJNAME }}-${{ steps.get_names.outputs.TAGNAME }}-linux-x86_64.tar.gz
asset_content_type: application/x-gzip
- name: Upload Release Asset OSX
id: upload-release-asset-osx
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.get_names.outputs.PROJNAME }}-${{ steps.get_names.outputs.TAGNAME }}-osx-x86_64.tar.gz
asset_name: ${{ steps.get_names.outputs.PROJNAME }}-${{ steps.get_names.outputs.TAGNAME }}-osx-x86_64.tar.gz
asset_content_type: application/x-gzip