From d6f6ada0f4690f16ee2b807a42a1c6c4a33efe70 Mon Sep 17 00:00:00 2001 From: peti446 Date: Wed, 22 Nov 2023 20:42:50 +0000 Subject: [PATCH] chore: Added extra build files --- .github/workflows/build_beta.yml | 56 +++++++++ .../workflows/{build.yml => build_main.yml} | 108 +++++++++--------- .github/workflows/update_translations.yml | 15 +++ 3 files changed, 125 insertions(+), 54 deletions(-) create mode 100644 .github/workflows/build_beta.yml rename .github/workflows/{build.yml => build_main.yml} (96%) create mode 100644 .github/workflows/update_translations.yml diff --git a/.github/workflows/build_beta.yml b/.github/workflows/build_beta.yml new file mode 100644 index 0000000..91769fa --- /dev/null +++ b/.github/workflows/build_beta.yml @@ -0,0 +1,56 @@ +name: CI Beta + +on: + push: + branches: + - beta + +jobs: + Lint-Project: + runs-on: ubuntu-latest + steps: + - name: "Update Image" + if: ${{ env.ACT }} + run: | + sudo apt update + - uses: actions/checkout@v4 + with: + fetch-depth: 50 + - name: Lint lua files + uses: nebularg/actions-luacheck@v1.1.2 + with: + args: "--no-color -q --no-self" + annotate: warning + - name: Create alpha package + uses: BigWigsMods/packager@master + with: + args: -d -z + - name: Upload alpha package to artifacts + uses: actions/upload-artifact@v3 + with: + name: SwitchSwitch-Beta.zip + path: | + .release/* + - name: Remove old artifacts + uses: c-hive/gha-remove-artifacts@v1 + with: + age: '3 month' + skip-tags: true + Deploy-Packages: + if: startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + needs: Lint-Project + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 50 + - name: Upload locales strings to CurseForge + run: ./CurseForge_UpldateTranslations.sh + env: + CF_API_KEY: ${{ secrets.CF_API_KEY }} + - name: Create and uploat to curseforge + uses: BigWigsMods/packager@master + env: + CF_API_KEY: ${{ secrets.CF_API_KEY }} + WOWI_API_TOKEN : ${{ secrets.WOWI_API_TOKEN }} + GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build.yml b/.github/workflows/build_main.yml similarity index 96% rename from .github/workflows/build.yml rename to .github/workflows/build_main.yml index 2630942..090ebc5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build_main.yml @@ -1,54 +1,54 @@ -name: CI - -on: push - -jobs: - Lint-Project: - runs-on: ubuntu-latest - steps: - - name: "Update Image" - if: ${{ env.ACT }} - run: | - sudo apt update - - uses: actions/checkout@v4 - with: - fetch-depth: 50 - - name: Lint lua files - uses: nebularg/actions-luacheck@v1.1.2 - with: - args: "--no-color -q --no-self" - annotate: warning - - name: Create alpha package - uses: BigWigsMods/packager@master - with: - args: -d -z - - name: Upload alpha package to artifacts - uses: actions/upload-artifact@v3 - with: - name: SwitchSwitch.zip - path: | - .release/* - - name: Remove old artifacts - uses: c-hive/gha-remove-artifacts@v1 - with: - age: '3 month' - skip-tags: true - - Deploy-Packages: - if: startsWith(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - needs: Lint-Project - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 50 - - name: Upload locales strings to CurseForge - run: ./CurseForge_UpldateTranslations.sh - env: - CF_API_KEY: ${{ secrets.CF_API_KEY }} - - name: Create and uploat to curseforge - uses: BigWigsMods/packager@master - env: - CF_API_KEY: ${{ secrets.CF_API_KEY }} - WOWI_API_TOKEN : ${{ secrets.WOWI_API_TOKEN }} - GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} +name: CI + +on: push + +jobs: + Lint-Project: + runs-on: ubuntu-latest + steps: + - name: "Update Image" + if: ${{ env.ACT }} + run: | + sudo apt update + - uses: actions/checkout@v4 + with: + fetch-depth: 50 + - name: Lint lua files + uses: nebularg/actions-luacheck@v1.1.2 + with: + args: "--no-color -q --no-self" + annotate: warning + - name: Create alpha package + uses: BigWigsMods/packager@master + with: + args: -d -z + - name: Upload alpha package to artifacts + uses: actions/upload-artifact@v3 + with: + name: SwitchSwitch.zip + path: | + .release/* + - name: Remove old artifacts + uses: c-hive/gha-remove-artifacts@v1 + with: + age: '3 month' + skip-tags: true + + Deploy-Packages: + if: startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + needs: Lint-Project + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 50 + - name: Upload locales strings to CurseForge + run: ./CurseForge_UpldateTranslations.sh + env: + CF_API_KEY: ${{ secrets.CF_API_KEY }} + - name: Create and uploat to curseforge + uses: BigWigsMods/packager@master + env: + CF_API_KEY: ${{ secrets.CF_API_KEY }} + WOWI_API_TOKEN : ${{ secrets.WOWI_API_TOKEN }} + GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/update_translations.yml b/.github/workflows/update_translations.yml new file mode 100644 index 0000000..a6d8bbd --- /dev/null +++ b/.github/workflows/update_translations.yml @@ -0,0 +1,15 @@ +name: Update curse forge translations +on: + workflow_dispatch: + +jobs: + UpdateTranslations: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 50 + - name: Upload locales strings to CurseForge + run: ./CurseForge_UpldateTranslations.sh + env: + CF_API_KEY: ${{ secrets.CF_API_KEY }} \ No newline at end of file