2021-12-10 23:19:15 +00:00
|
|
|
name: Release Nightly
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-12-10 23:25:28 +00:00
|
|
|
branches: [ main ]
|
2021-12-11 11:12:04 +00:00
|
|
|
paths:
|
|
|
|
- 'src/**'
|
2022-01-13 21:57:35 +00:00
|
|
|
- 'scripts/**'
|
2021-12-11 11:12:04 +00:00
|
|
|
- 'polyfills/**'
|
2021-12-11 11:26:47 +00:00
|
|
|
- '.github/workflows/release_nightly.yml'
|
2021-12-10 23:19:15 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Setup Node.js v16.x
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 16.x
|
|
|
|
|
2021-12-11 11:21:34 +00:00
|
|
|
- name: Pack base asar
|
2021-12-10 23:19:15 +00:00
|
|
|
run: |
|
2022-01-14 14:02:26 +00:00
|
|
|
npm i -g asar uglify-js
|
2022-01-19 18:44:17 +00:00
|
|
|
bash scripts/injectPolyfills.sh
|
2021-12-11 20:09:43 +00:00
|
|
|
sed -i -e "s/nightly/nightly-$(git rev-parse HEAD | cut -c 1-7)/" src/index.js
|
2021-12-11 18:21:59 +00:00
|
|
|
|
2021-12-14 23:03:26 +00:00
|
|
|
npx asar pack src app.asar
|
2021-12-10 23:19:15 +00:00
|
|
|
|
2022-01-13 13:29:39 +00:00
|
|
|
- name: Pack minified asar
|
|
|
|
run: |
|
2022-01-13 21:13:48 +00:00
|
|
|
npm i -g esbuild uglify-js minify-json html-minifier
|
|
|
|
bash scripts/minify.sh
|
2022-01-15 20:28:35 +00:00
|
|
|
mv minified.asar minified_testing_dont_use.asar
|
2021-12-11 11:21:34 +00:00
|
|
|
|
2021-12-11 10:23:24 +00:00
|
|
|
- name: GitHub Release
|
|
|
|
run: |
|
2021-12-16 13:09:56 +00:00
|
|
|
git tag -d nightly
|
2021-12-16 13:12:33 +00:00
|
|
|
git push origin --delete nightly
|
2021-12-16 13:09:56 +00:00
|
|
|
git tag nightly
|
|
|
|
git push origin nightly
|
2021-12-11 10:23:24 +00:00
|
|
|
gh release delete ${{ env.VERSION }} -y
|
2021-12-11 20:10:49 +00:00
|
|
|
gh release create ${{ env.VERSION }} -t "${{ env.NAME }}" -n "${{ env.BODY }}" ${{ env.FILES }}
|
2021-12-11 10:23:24 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
|
|
|
VERSION: 'nightly'
|
|
|
|
NAME: 'Nightly'
|
2021-12-11 16:02:44 +00:00
|
|
|
BODY: Latest Nightly release
|
2022-01-15 20:28:35 +00:00
|
|
|
FILES: app.asar minified_testing_dont_use.asar
|
2022-01-13 13:29:39 +00:00
|
|
|
# FILES: app.asar
|