53 lines
No EOL
1.3 KiB
YAML
53 lines
No EOL
1.3 KiB
YAML
name: Release Nightly
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
paths:
|
|
- 'src/**'
|
|
- 'scripts/**'
|
|
- 'polyfills/**'
|
|
- '.github/workflows/release_nightly.yml'
|
|
|
|
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
|
|
|
|
- name: Pack base asar
|
|
run: |
|
|
npm i -g asar uglify-js
|
|
bash scripts/injectPolyfills.sh
|
|
sed -i -e "s/nightly/nightly-$(git rev-parse HEAD | cut -c 1-7)/" src/index.js
|
|
|
|
npx asar pack src app.asar
|
|
|
|
- name: Pack minified asar
|
|
run: |
|
|
npm i -g esbuild uglify-js minify-json html-minifier
|
|
bash scripts/minify.sh
|
|
mv minified.asar minified_testing_dont_use.asar
|
|
|
|
- name: GitHub Release
|
|
run: |
|
|
git tag -d nightly
|
|
git push origin --delete nightly
|
|
git tag nightly
|
|
git push origin nightly
|
|
gh release delete ${{ env.VERSION }} -y
|
|
gh release create ${{ env.VERSION }} -t "Nightly" -n "$(git log -1 --pretty=%B)" ${{ env.FILES }}
|
|
env:
|
|
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
|
VERSION: 'nightly'
|
|
NAME: 'Nightly'
|
|
FILES: app.asar minified_testing_dont_use.asar
|
|
# FILES: app.asar |