From 52705bf5866c0846f60d8784364c3d97f09d5841 Mon Sep 17 00:00:00 2001 From: MarvNC Date: Fri, 12 Jul 2024 01:13:26 -0700 Subject: [PATCH] Matrix each language in workflow --- .github/workflows/run-upload-release.yaml | 59 +++++++++++++++++------ 1 file changed, 44 insertions(+), 15 deletions(-) diff --git a/.github/workflows/run-upload-release.yaml b/.github/workflows/run-upload-release.yaml index 9066d20..1bb2818 100644 --- a/.github/workflows/run-upload-release.yaml +++ b/.github/workflows/run-upload-release.yaml @@ -1,14 +1,39 @@ -name: Run and Upload +name: Run and Upload Release -on: - workflow_dispatch: - push: - tags: - - 'v*' +on: [push, pull_request] jobs: run-and-upload: runs-on: windows-latest + strategy: + matrix: + # Copy from constants.ts + language: + [ + 'hu', + 'eu', + 'pt', + 'ga', + 'el', + 'de', + 'eo', + 'ar', + 'id', + 'pl', + 'cs', + 'ca', + 'sv', + 'ru', + 'nl', + 'uk', + 'en', + 'ko', + 'es', + 'ja', + 'zh', + 'fr', + 'it', + ] steps: - name: Checkout Repository @@ -22,13 +47,14 @@ jobs: - name: Install Dependencies run: bun install --frozen-lockfile - - name: Run Application - run: bun run start -a + - name: Run Application for ${{ matrix.language }} + run: bun run start -l ${{ matrix.language }} -d 2022-12-01 - name: Upload Artifacts uses: actions/upload-artifact@v4 with: path: out/ + release: runs-on: windows-latest if: startsWith(github.ref, 'refs/tags/v') @@ -37,6 +63,9 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 + - name: Download Artifacts + uses: actions/download-artifact@v4 + - name: Setup Bun uses: oven-sh/setup-bun@v2 with: @@ -49,13 +78,13 @@ jobs: run: bun run releasetable ${{ github.ref }} - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: softprops/action-gh-release@v2 with: tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - body_path: release.md - draft: true + draft: false prerelease: false + generate_release_notes: true + append_body: true + body_path: release.md + files: | + out/