OpenAsar/.github/workflows/release_nightly.yml

54 lines
1.3 KiB
YAML
Raw Normal View History

2021-12-10 23:19:15 +00:00
name: Release Nightly
on:
push:
2021-12-10 23:25:28 +00:00
branches: [ main ]
paths:
- 'src/**'
- 'scripts/**'
- '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
bash scripts/injectPolyfills.sh
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
mv minified.asar minified_testing_dont_use.asar
2021-12-11 11:21:34 +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
gh release delete ${{ env.VERSION }} -y
gh release create ${{ env.VERSION }} -t "${{ env.NAME }}" -n "${{ env.BODY }}" ${{ env.FILES }}
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
VERSION: 'nightly'
NAME: 'Nightly'
2021-12-11 16:02:44 +00:00
BODY: Latest Nightly release
FILES: app.asar minified_testing_dont_use.asar
2022-01-13 13:29:39 +00:00
# FILES: app.asar