Skip to content

Commit

Permalink
Matrix each language in workflow (#15)
Browse files Browse the repository at this point in the history
* Matrix each language in workflow

* Specify paths

* Fix artifacts
  • Loading branch information
MarvNC authored Jul 12, 2024
1 parent 6f51e39 commit 1635509
Showing 1 changed file with 47 additions and 10 deletions.
57 changes: 47 additions & 10 deletions .github/workflows/run-upload-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,35 @@ on:
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
Expand All @@ -22,13 +51,15 @@ jobs:
- name: Install Dependencies
run: bun install --frozen-lockfile

- name: Run Application
run: bun run start -a
- name: Make Dictionary 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/
path: out/*.zip
name: ${{ matrix.language }}

release:
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/v')
Expand All @@ -37,6 +68,11 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Download Artifacts to out
uses: actions/download-artifact@v4
with:
path: out

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
Expand All @@ -49,13 +85,14 @@ 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/*.zip

0 comments on commit 1635509

Please sign in to comment.