-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (88 loc) · 3.03 KB
/
Copy pathrelease.yml
File metadata and controls
109 lines (88 loc) · 3.03 KB
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
name: Release
on:
push:
# tags:
# - '*'
branches:
- master
- main
pull_request:
branches:
- master
- main
env:
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules
jobs:
semantic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: npm install
run: npm install
- name: semantic
run: npm run release
nightly-release:
runs-on: ${{ matrix.os }}
needs: semantic
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v2
with:
path: "**/cpm_modules"
key: ${{ matrix.os }}-${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
- name: configure
run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
- name: build
run: cmake --build build -j4 --config Release
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: test var
run: echo "${{ steps.date.outputs.date }}"
- name: zip
uses: thedoctor0/zip-release@main
with:
type: zip
filename: ${{ matrix.os }}-${{ steps.date.outputs.date }}.zip
directory: build/out/
- uses: ncipollo/release-action@v1
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' #|| startsWith(github.ref, 'refs/tags')
with:
allowUpdates: true
artifacts: build/out/${{ matrix.os }}-${{ steps.date.outputs.date }}.zip
tag: ${{ steps.date.outputs.date }}
nightly-release-emscripten:
runs-on: ubuntu-latest
container: emscripten/emsdk
needs: semantic
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: "**/cpm_modules"
key: emscripten-${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
- name: configure
run: emcmake cmake -DCMAKE_C_ABI_COMPILED=ON -DCMAKE_CXX_ABI_COMPILED=ON -DEMSCRIPTEN=1 -DCMAKE_BUILD_TYPE=MinSizeRel -S. -Bbuild -DENABLE_TEST_COVERAGE=OFF -DENABLE_STANDALONE=ON -DENABLE_DOCUMENTATION=OFF -DCMAKE_EXECUTABLE_SUFFIX=".html"
- name: build
run: cmake --build build -j4 --config Release
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: zip
uses: thedoctor0/zip-release@main
with:
type: zip
filename: emscripten-${{ steps.date.outputs.date }}.zip
directory: build/out/
- uses: ncipollo/release-action@v1
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' #|| startsWith(github.ref, 'refs/tags')
with:
allowUpdates: true
artifacts: build/out/emscripten-${{ steps.date.outputs.date }}.zip
tag: ${{ steps.date.outputs.date }}