2024-03-05 14:36:14 +00:00
|
|
|
name: build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: build
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
submodules: 'false'
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Setup Node.js
|
|
|
|
uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version: '20.3.1'
|
|
|
|
|
|
|
|
- name: Build Packages
|
|
|
|
run: |
|
|
|
|
corepack enable
|
|
|
|
yarn install --immutable
|
|
|
|
yarn build
|
|
|
|
shell: bash
|
|
|
|
|
2024-03-08 04:10:25 +00:00
|
|
|
- name: Upload LiteLoaderQQNT Plugin
|
2024-03-05 14:36:14 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2024-03-08 04:10:25 +00:00
|
|
|
name: chronocat-llqqnt-${{ github.sha }}
|
|
|
|
path: build/dist/llqqnt
|
2024-03-05 14:36:14 +00:00
|
|
|
|
2024-03-09 18:32:10 +00:00
|
|
|
- name: Upload engine-chronocat-api LiteLoaderQQNT Plugin
|
2024-03-05 14:36:14 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2024-03-09 18:32:10 +00:00
|
|
|
name: chronocat-llqqnt-engine-chronocat-api-${{ github.sha }}
|
|
|
|
path: build/dist/llqqnt-plugin-chronocat-engine-chronocat-api
|
2024-03-05 14:36:14 +00:00
|
|
|
|
2024-03-09 18:32:10 +00:00
|
|
|
- name: Upload engine-chronocat-event LiteLoaderQQNT Plugin
|
2024-03-05 14:36:14 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2024-03-09 18:32:10 +00:00
|
|
|
name: chronocat-llqqnt-engine-chronocat-event-${{ github.sha }}
|
|
|
|
path: build/dist/llqqnt-plugin-chronocat-engine-chronocat-event
|
|
|
|
|
2024-09-07 07:32:24 +00:00
|
|
|
- name: Upload engine-media LiteLoaderQQNT Plugin
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: chronocat-llqqnt-engine-media-${{ github.sha }}
|
|
|
|
path: build/dist/llqqnt-plugin-chronocat-engine-media
|
|
|
|
|
2024-03-09 18:32:10 +00:00
|
|
|
# - name: Upload engine-chronocat-api
|
|
|
|
# uses: actions/upload-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: engine-chronocat-api-${{ github.sha }}
|
|
|
|
# path: build/dist/engine-chronocat-api
|
|
|
|
|
|
|
|
# - name: Upload engine-chronocat-event
|
|
|
|
# uses: actions/upload-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: engine-chronocat-event-${{ github.sha }}
|
|
|
|
# path: build/dist/engine-chronocat-event
|
2024-03-05 14:36:14 +00:00
|
|
|
|
2024-09-07 07:32:24 +00:00
|
|
|
# - name: Upload engine-chronocat-event
|
|
|
|
# uses: actions/upload-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: engine-media-${{ github.sha }}
|
|
|
|
# path: build/dist/engine-media
|
|
|
|
|
2024-03-09 18:46:28 +00:00
|
|
|
# - name: Upload IIFE
|
|
|
|
# uses: actions/upload-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: chronocat-iife-${{ github.sha }}
|
|
|
|
# path: build/dist/iife
|
2024-03-08 15:52:23 +00:00
|
|
|
|
|
|
|
- name: Build IIFE-TI
|
|
|
|
env:
|
|
|
|
TI_KEY: ${{ secrets.TI_KEY }}
|
2024-03-08 18:57:10 +00:00
|
|
|
if: env.TI_KEY != null
|
2024-03-08 15:52:23 +00:00
|
|
|
run: |
|
|
|
|
mkdir -p build/dist/iife-ti
|
|
|
|
echo "$TI_KEY" > $RUNNER_TEMP/ti.pem
|
|
|
|
openssl dgst -sha256 -sign $RUNNER_TEMP/ti.pem -keyform PEM -out build/dist/iife-ti/chronocat.js.ti.bin -binary build/dist/iife/chronocat.js
|
|
|
|
rm $RUNNER_TEMP/ti.pem
|
|
|
|
cat build/dist/iife/chronocat.js >> build/dist/iife-ti/chronocat.js.ti.bin
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Upload IIFE-TI
|
2024-03-08 18:57:10 +00:00
|
|
|
env:
|
|
|
|
TI_KEY: ${{ secrets.TI_KEY }}
|
|
|
|
if: env.TI_KEY != null
|
2024-03-08 15:52:23 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: chronocat-iife-ti-${{ github.sha }}
|
|
|
|
path: build/dist/iife-ti/chronocat.js.ti.bin
|
|
|
|
|
2024-03-07 11:51:55 +00:00
|
|
|
- name: Upload Build Metadata
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: meta-${{ github.sha }}
|
|
|
|
path: build/meta
|
|
|
|
|
2024-03-05 14:36:14 +00:00
|
|
|
- name: Publish LiteLoaderQQNT-Plugin-Chronocat
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
personal_token: ${{ secrets.DEPLOY_TOKEN }}
|
|
|
|
user_name: 'Il Harper'
|
|
|
|
user_email: 'hi@ilharper.com'
|
|
|
|
external_repository: chrononeko/LiteLoaderQQNT-Plugin-Chronocat
|
|
|
|
publish_branch: master
|
2024-03-08 04:10:25 +00:00
|
|
|
publish_dir: build/dist/llqqnt/LiteLoaderQQNT-Plugin-Chronocat
|
2024-03-05 14:36:14 +00:00
|
|
|
enable_jekyll: true # Not to create .nojekyll since this is not a gh page
|
|
|
|
commit_message: 'chore: publish ${{ github.sha }}'
|
2024-03-16 19:16:54 +00:00
|
|
|
|
|
|
|
- name: Publish LiteLoaderQQNT-Plugin-Chronocat-Engine-Chronocat-Api
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
personal_token: ${{ secrets.DEPLOY_TOKEN }}
|
|
|
|
user_name: 'Il Harper'
|
|
|
|
user_email: 'hi@ilharper.com'
|
|
|
|
external_repository: chrononeko/LiteLoaderQQNT-Plugin-Chronocat-Engine-Chronocat-Api
|
|
|
|
publish_branch: master
|
|
|
|
publish_dir: build/dist/llqqnt-plugin-chronocat-engine-chronocat-api/LiteLoaderQQNT-Plugin-Chronocat-Engine-Chronocat-Api
|
|
|
|
enable_jekyll: true # Not to create .nojekyll since this is not a gh page
|
|
|
|
commit_message: 'chore: publish ${{ github.sha }}'
|
|
|
|
|
|
|
|
- name: Publish LiteLoaderQQNT-Plugin-Chronocat-Engine-Chronocat-Event
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
personal_token: ${{ secrets.DEPLOY_TOKEN }}
|
|
|
|
user_name: 'Il Harper'
|
|
|
|
user_email: 'hi@ilharper.com'
|
|
|
|
external_repository: chrononeko/LiteLoaderQQNT-Plugin-Chronocat-Engine-Chronocat-Event
|
|
|
|
publish_branch: master
|
|
|
|
publish_dir: build/dist/llqqnt-plugin-chronocat-engine-chronocat-event/LiteLoaderQQNT-Plugin-Chronocat-Engine-Chronocat-Event
|
|
|
|
enable_jekyll: true # Not to create .nojekyll since this is not a gh page
|
|
|
|
commit_message: 'chore: publish ${{ github.sha }}'
|
2024-09-07 07:32:24 +00:00
|
|
|
|
|
|
|
- name: Publish LiteLoaderQQNT-Plugin-Chronocat-Engine-Media
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
personal_token: ${{ secrets.DEPLOY_TOKEN }}
|
|
|
|
user_name: 'Il Harper'
|
|
|
|
user_email: 'hi@ilharper.com'
|
|
|
|
external_repository: chrononeko/LiteLoaderQQNT-Plugin-Chronocat-Engine-Media
|
|
|
|
publish_branch: master
|
|
|
|
publish_dir: build/dist/llqqnt-plugin-chronocat-engine-media/LiteLoaderQQNT-Plugin-Chronocat-Engine-Media
|
|
|
|
enable_jekyll: true # Not to create .nojekyll since this is not a gh page
|
|
|
|
commit_message: 'chore: publish ${{ github.sha }}'
|