-
-
Notifications
You must be signed in to change notification settings - Fork 25
153 lines (123 loc) · 3.77 KB
/
build-nightly.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
name: ezytdl distributable build
run-name: ${{ github.actor }} - ${{ github.event_name }} - ${{ github.sha }}
on:
workflow_dispatch:
inputs:
name:
description: "Release Name"
required: false
default: 'Stable Release'
jobs:
release_info:
runs-on: ubuntu-latest
name: Create release tag
permissions: write-all
outputs:
release_id: ${{ steps.create_release.outputs.id }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get release metadata
id: get_release_metadata
run: |
echo "TAG_NAME=$(node -e "console.log(require('./package.json').version)")-dev.${{github.run_number}}" >> "$GITHUB_ENV"
echo "RELEASE_TITLE=${{ inputs.name }}" >> "$GITHUB_ENV"
echo "RELEASE_NAME=dev.${{github.run_number}} - ${{ inputs.name }}" >> "$GITHUB_ENV"
echo "BODY_PATH=$(echo "$(pwd)/release-notes.md")" >> "$GITHUB_ENV"
- name: Create release notes
id: create_notes
run: |
node devscripts/generateReleaseNotes.js stable
- name: Create release draft
id: create_release
uses: ncipollo/release-action@v1
with:
tag: ${{ env.TAG_NAME }}
name: ${{ env.RELEASE_NAME }}
commit: ${{ github.sha }}
draft: true
prerelease: false
makeLatest: true
bodyFile: ${{ env.BODY_PATH }}
omitBody: false
omitBodyDuringUpdate: true
linux-dist:
needs: release_info
runs-on: ubuntu-22.04
permissions: write-all
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Install Node.js & NPM
uses: actions/setup-node@main
with:
node-version: "18"
- name: Install npm deps
run: |
npm install
- name: Build app
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm run nightly -- --build-number ${{github.run_number}}
macos-dist:
needs: release_info
runs-on: macos-latest
permissions: write-all
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Install Node.js & NPM
uses: actions/setup-node@main
with:
node-version: "18"
- name: Install npm deps
run: |
npm install
- name: Build app
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm run nightly -- --build-number ${{github.run_number}}
windows-dist:
needs: release_info
runs-on: windows-latest
permissions: write-all
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Install Node.js & NPM
uses: actions/setup-node@main
with:
node-version: "18"
- name: Install npm deps
run: |
npm install
- name: Build app
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm run nightly -- --build-number ${{github.run_number}}
#release:
# needs: [linux-dist, macos-dist, windows-dist, release_info]
# name: "Release the build"
# runs-on: "ubuntu-latest"
# permissions: write-all
# steps:
# - name: Publish
# uses: eregon/publish-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# release_id: ${{ needs.release_info.outputs.release_id }}
# - name: Delete older nightly builds
# uses: dev-drprasad/[email protected]
# with:
# keep_latest: 3
# delete_tags: true
# delete_tag_pattern: dev
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}