mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-13 04:05:04 +03:00
Merge ci-for-auto-update to main
This commit is contained in:
+17
-81
@@ -54,11 +54,18 @@ jobs:
|
|||||||
run: pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data ./backend/static:/static --add-data ./backend/legacy:/legacy ./backend/*.py
|
run: pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data ./backend/static:/static --add-data ./backend/legacy:/legacy ./backend/*.py
|
||||||
|
|
||||||
- name: Upload package artifact ⬆️
|
- name: Upload package artifact ⬆️
|
||||||
|
if: ${{ !env.ACT }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: PluginLoader
|
name: PluginLoader
|
||||||
path: ./dist/PluginLoader
|
path: ./dist/PluginLoader
|
||||||
|
|
||||||
|
- name: Download package artifact locally
|
||||||
|
if: ${{ env.ACT }}
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
path: ./dist/PluginLoader
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Release the package
|
name: Release the package
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.release == 'release' }}
|
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.release == 'release' }}
|
||||||
@@ -77,6 +84,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Release 📦
|
- name: Release 📦
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: ${{ !env.ACT }}
|
||||||
with:
|
with:
|
||||||
name: Release ${{ steps.tag_version.outputs.new_tag }}
|
name: Release ${{ steps.tag_version.outputs.new_tag }}
|
||||||
tag_name: ${{ steps.tag_version.outputs.new_tag }}
|
tag_name: ${{ steps.tag_version.outputs.new_tag }}
|
||||||
@@ -90,6 +98,12 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install semver-tool asdf
|
||||||
|
uses: asdf-vm/actions/install@v1
|
||||||
|
with:
|
||||||
|
tool_versions: |
|
||||||
|
semver 3.3.0
|
||||||
|
|
||||||
- name: Checkout 🧰
|
- name: Checkout 🧰
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
@@ -98,13 +112,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: PluginLoader
|
name: PluginLoader
|
||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
- name: Install semver-tool asdf
|
|
||||||
uses: asdf-vm/actions/install@v1
|
|
||||||
with:
|
|
||||||
tool_versions: |
|
|
||||||
semver 3.3.0
|
|
||||||
|
|
||||||
- name: Get tag 🏷️
|
- name: Get tag 🏷️
|
||||||
id: old_tag
|
id: old_tag
|
||||||
uses: rafarlopes/get-latest-pre-release-tag-action@v1
|
uses: rafarlopes/get-latest-pre-release-tag-action@v1
|
||||||
@@ -124,89 +132,17 @@ jobs:
|
|||||||
|
|
||||||
- name: Push tag 📤
|
- name: Push tag 📤
|
||||||
uses: rickstaa/action-create-tag@v1.3.2
|
uses: rickstaa/action-create-tag@v1.3.2
|
||||||
if: ${{ steps.ready_tag.outputs.tag_name && github.event_name == 'workflow_dispatch' }}
|
if: ${{ steps.ready_tag.outputs.tag_name && github.event_name == 'workflow_dispatch' && !env.ACT }}
|
||||||
with:
|
with:
|
||||||
tag: ${{ steps.ready_tag.outputs.tag_name }}
|
tag: ${{ steps.ready_tag.outputs.tag_name }}
|
||||||
message: Pre-release ${{ steps.ready_tag.outputs.tag_name }}
|
message: Pre-release ${{ steps.ready_tag.outputs.tag_name }}
|
||||||
|
|
||||||
- name: Release 📦
|
- name: Release 📦
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
if: ${{ github.event_name == 'workflow_dispatch' && !env.ACT }}
|
||||||
with:
|
with:
|
||||||
name: Prerelease ${{ steps.ready_tag.outputs.tag_name }}
|
name: Prerelease ${{ steps.ready_tag.outputs.tag_name }}
|
||||||
tag_name: ${{ steps.ready_tag.outputs.tag_name }}
|
tag_name: ${{ steps.ready_tag.outputs.tag_name }}
|
||||||
files: ./dist/PluginLoader
|
files: ./dist/PluginLoader
|
||||||
prerelease: true
|
prerelease: true
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
|
|
||||||
# nightly:
|
|
||||||
# name: Release the nightly version of the package
|
|
||||||
# if: ${{ github.event_name == 'schedule' }}
|
|
||||||
# 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: Get tag 🏷️
|
|
||||||
# id: old_tag
|
|
||||||
# uses: rafarlopes/get-latest-pre-release-tag-action@v1
|
|
||||||
# env:
|
|
||||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
# with:
|
|
||||||
# repository: 'decky-loader'
|
|
||||||
|
|
||||||
# - name: Prepare tag ⚙️
|
|
||||||
# id: ready_tag
|
|
||||||
# run: |
|
|
||||||
# export VERSION=${{ steps.old_tag.outputs.tag }}
|
|
||||||
# export COMMIT=$(git log -1 --pretty=format:%h)
|
|
||||||
# echo ::set-output name=tag_name::$(sed -r 's/(-.*)?-pre$//' <<< $VERSION)-$COMMIT-nightly
|
|
||||||
|
|
||||||
# - name: Push tag 📤
|
|
||||||
# uses: rickstaa/action-create-tag@v1.3.2
|
|
||||||
# if: ${{ steps.ready_tag.outputs.tag_name && github.event_name == 'workflow_dispatch' }}
|
|
||||||
# with:
|
|
||||||
# tag: ${{ steps.ready_tag.outputs.tag_name }}
|
|
||||||
# message: Nightly ${{ steps.ready_tag.outputs.tag_name }}
|
|
||||||
|
|
||||||
# - name: Release 📦
|
|
||||||
# uses: softprops/action-gh-release@v1
|
|
||||||
# if: ${{ github.event_name == 'workflow_dispatch' }}
|
|
||||||
# with:
|
|
||||||
# name: Prerelease ${{ steps.ready_tag.outputs.tag_name }}
|
|
||||||
# tag_name: ${{ steps.ready_tag.outputs.tag_name }}
|
|
||||||
# files: ./dist/PluginLoader
|
|
||||||
# prerelease: true
|
|
||||||
# generate_release_notes: true
|
|
||||||
|
|
||||||
# - name: Bump prerelease ⏫
|
|
||||||
# id: bump
|
|
||||||
# if: ${{ github.event_name == 'schedule' }}
|
|
||||||
# run: |
|
|
||||||
# git_hash=$(git rev-parse --short "$GITHUB_SHA")
|
|
||||||
# echo ::set-output new_tag="nightly-$git_hash"
|
|
||||||
|
|
||||||
# - name: Push tag 📤
|
|
||||||
# uses: rickstaa/action-create-tag@v1.3.2
|
|
||||||
# if: ${{ github.event_name == 'schedule' }}
|
|
||||||
# with:
|
|
||||||
# tag: ${{ steps.bump.outputs.new_tag }}
|
|
||||||
# message: Nightly ${{ steps.bump.outputs.new_tag }}
|
|
||||||
|
|
||||||
# - name: Release 📦
|
|
||||||
# uses: softprops/action-gh-release@v1
|
|
||||||
# if: ${{ github.event_name == 'schedule' }}
|
|
||||||
# with:
|
|
||||||
# name: Nightly ${{ steps.bump.outputs.new_tag }}
|
|
||||||
# tag_name: ${{ steps.bump.outputs.new_tag }}
|
|
||||||
# files: ./dist/PluginLoader
|
|
||||||
# prerelease: true
|
|
||||||
# generate_release_notes: true
|
|
||||||
|
|||||||
+3
-1
@@ -159,4 +159,6 @@ backend/static
|
|||||||
.vscode/settings.json
|
.vscode/settings.json
|
||||||
|
|
||||||
# plugins folder for local launches
|
# plugins folder for local launches
|
||||||
plugins/*
|
plugins/*
|
||||||
|
act/.directory
|
||||||
|
act/artifacts/*
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
this directory contains artifacts generated by invocations of https://github.com/nektos/act in order to do local testing of binary builds
|
||||||
|
|
||||||
|
how to?
|
||||||
|
run:
|
||||||
|
|
||||||
|
./act/run-act.sh prerelease
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
./act/run-act.sh release
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"inputs": {
|
||||||
|
"release": "prerelease"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"inputs": {
|
||||||
|
"release": "release"
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+44
@@ -0,0 +1,44 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
type=$1
|
||||||
|
|
||||||
|
oldartifactsdir="old"
|
||||||
|
|
||||||
|
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
|
||||||
|
cd "$parent_path"
|
||||||
|
|
||||||
|
artifactfolders=$(find artifacts/ -maxdepth 1 -mindepth 1 -type d)
|
||||||
|
if [[ ${#artifactfolders[@]} > 0 ]]; then
|
||||||
|
for i in ${artifactfolders[@]}; do
|
||||||
|
foldername=$(dirname $i)
|
||||||
|
subfoldername=$(basename $i)
|
||||||
|
out=$foldername/$oldartifactsdir/$subfoldername-$(date +'%s')
|
||||||
|
if [[ ! "$subfoldername" =~ "$oldartifactsdir" ]]; then
|
||||||
|
mkdir -p $out
|
||||||
|
mv $i $out
|
||||||
|
printf "Moved "${foldername}"/"${subfoldername}" to "${out}" \n"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
if [[ "$type" == "release" ]]; then
|
||||||
|
printf "release!\n"
|
||||||
|
act workflow_dispatch -e act/release.json --artifact-server-path act/artifacts
|
||||||
|
elif [[ "$type" == "prerelease" ]]; then
|
||||||
|
printf "prerelease!\n"
|
||||||
|
act workflow_dispatch -e act/prerelease.json --artifact-server-path act/artifacts
|
||||||
|
else
|
||||||
|
printf "Release type unspecified/badly specified.\n"
|
||||||
|
printf "Options: 'release' or 'prerelease'\n"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd act/artifacts
|
||||||
|
|
||||||
|
if [[ -d "1" ]]; then
|
||||||
|
cd "1/artifact"
|
||||||
|
cp "PluginLoader.gz__" "PluginLoader.gz"
|
||||||
|
gzip -d "PluginLoader.gz"
|
||||||
|
chmod +x PluginLoader
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user