summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorbotato <63275405+botatooo@users.noreply.github.com>2022-07-11 03:13:56 -0400
committerGitHub <noreply@github.com>2022-07-11 09:13:56 +0200
commit470f16adda9098436f2e17223db4a7c9dc85b284 (patch)
treeb6fe5217b9d9c4a0781e86ad425d123883e54e5d /.github
parent76424174edfb330eecdf2d84ec02f8e9fc0e814f (diff)
downloaddecky-loader-470f16adda9098436f2e17223db4a7c9dc85b284.tar.gz
decky-loader-470f16adda9098436f2e17223db4a7c9dc85b284.zip
CI revamp (#110)
* ci: automatically make releases, ... - option to run manually (for full-fledged releases) - cron schedule for pre-releases (every day at 1 pm UTC) - semantic versioning - Automatically generated release description * formatting * more formatting .-. * Tweak according to latest release
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml107
1 files changed, 88 insertions, 19 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index fb45ecf9..14be7b2e 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -2,52 +2,121 @@ name: Builder
on:
push:
- branches: [ "*" ]
pull_request:
- branches: [ "*" ]
+ schedule:
+ - cron: '0 13 * * *' # run at 1 PM UTC
+ workflow_dispatch:
+ inputs:
+ release:
+ type: choice
+ description: Release the asset
+ default: 'none'
+ options:
+ - none
+ - prerelease
+ - release
permissions:
- contents: read
+ contents: write
jobs:
build:
-
- name: Packager
+ name: Build PluginLoader
runs-on: ubuntu-latest
steps:
- - name: 🧰 Checkout
+ - name: Checkout 🧰
uses: actions/checkout@v3
- - name: 💎 Set up NodeJS 17
+ - name: Set up NodeJS 17 💎
uses: actions/setup-node@v3
with:
node-version: 17
- - name: 🐍 Set up Python 3.10
+ - name: Set up Python 3.10 🐍
uses: actions/setup-python@v3
with:
python-version: "3.10"
- - name: ⬇️ Install Python dependencies
+ - name: Install Python dependencies ⬇️
run: |
python -m pip install --upgrade pip
pip install pyinstaller
- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
+ [ -f requirements.txt ] && pip install -r requirements.txt
- - name: ⬇️ Install NodeJS dependencies
+ - name: Install NodeJS dependencies ⬇️
run: |
cd frontend
npm i
npm run build
- - name: 🛠️ Build
- run: |
- pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data ./backend/static:/static --add-data ./backend/legacy:/legacy ./backend/*.py
+ - name: Build 🛠️
+ run: pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data ./backend/static:/static --add-data ./backend/legacy:/legacy ./backend/*.py
- - name: ⬆️ Upload package
- uses: actions/upload-artifact@v2
+ - name: Upload package artifact ⬆️
+ uses: actions/upload-artifact@v3
+ with:
+ name: PluginLoader
+ path: ./dist/PluginLoader
+
+ release:
+ name: Release the package
+ if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.release == 'release' }}
+ needs: build
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout 🧰
+ uses: actions/checkout@v3
+
+ - name: Fetch package artifact ⬇️
+ uses: actions/download-artifact@v3
+ with:
+ name: PluginLoader
+ path: dist
+
+ - name: Bump version and push tag ⏫
+ id: tag_version
+ uses: mathieudutour/github-tag-action@v6.0
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Release 📦
+ uses: softprops/action-gh-release@v1
+ with:
+ name: Release ${{ steps.tag_version.outputs.new_tag }}
+ tag_name: ${{ steps.tag_version.outputs.new_tag }}
+ files: ./dist/PluginLoader
+ generate_release_notes: true
+
+ nightly:
+ name: Release the nightly version of the package
+ if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.release == 'prerelease') }}
+ needs: build
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout 🧰
+ uses: actions/checkout@v3
+
+ - name: Fetch package artifact ⬇️
+ uses: actions/download-artifact@v3
+ with:
+ name: PluginLoader
+ path: dist
+
+ - name: Bump version and push tag ⏫
+ id: tag_version
+ uses: mathieudutour/github-tag-action@v6.0
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ append_to_pre_release_tag: '-pre'
+
+ - name: Release 📦
+ uses: softprops/action-gh-release@v1
with:
- name: Plugin Loader
- path: |
- ./dist/PluginLoader
+ name: Nightly ${{ steps.tag_version.outputs.new_tag }}
+ tag_name: ${{ steps.tag_version.outputs.new_tag }}
+ files: ./dist/PluginLoader
+ prerelease: true
+ generate_release_notes: true