forked from Superalgos/Superalgos
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (61 loc) · 2.34 KB
/
release_build_dev.yml
File metadata and controls
76 lines (61 loc) · 2.34 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
name: Nightly develop Binaries
on:
schedule:
- cron: '20 3 * * *'
workflow_dispatch:
jobs:
create-release:
if: github.repository == 'superalgos/superalgos'
runs-on: ubuntu-latest
steps:
- name: Download a file
run: curl "https://raw.githubusercontent.com/${{ github.repository }}/develop/package.json" -o package.json
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
- name: Get version
id: vars
run: echo "::set-output name=tag::$(node -p "require('./package.json').version")"
- name: Create nightly release
id: create_release
uses: viperproject/create-nightly-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.vars.outputs.tag }}-${{ steps.date.outputs.date }}
release_name: Superalgos-Beta-v${{ steps.vars.outputs.tag }} Snapshot ${{ steps.date.outputs.date }}
keep_num: 5
keep_tags: false
build-release:
if: github.repository == 'superalgos/superalgos'
runs-on: ${{ matrix.os }}
needs: create-release
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
- name: Check out Git repository
uses: actions/checkout@v2
with:
ref: develop
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 14
- name: Get version
id: vars
run: echo "::set-output name=tag::$(node -p "require('./package.json').version")"
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.github_token }}
args: "-c.extraMetadata.version=${{ steps.vars.outputs.tag }}-${{ steps.date.outputs.date }} -c build/electron-builder.json -p onTagOrDraft"
# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
# release: ${{ startsWith(github.ref, 'refs/tags/v') }}
release: true