Skip to content

Commit

Permalink
feat: GitHub Actions Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigercrl authored Feb 26, 2024
1 parent 4698114 commit f8ad6eb
Showing 1 changed file with 96 additions and 0 deletions.
96 changes: 96 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Auto Build Artifacts
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
build:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [ macos-latest, ubuntu-20.04, windows-latest ]
runs-on: ${{ matrix.platform }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install dependencies (Ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Setup rust
uses: dtolnay/rust-toolchain@stable

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install PNPM
run: npm i -g pnpm

- name: Install frontend dependencies
run: pnpm install --no-frozen-lockfile

- name: Build tauri app
uses: tauri-apps/tauri-action@v0


- name: Upload Artifact (Windows|EXE)
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: MinecraftLanguageFileEditor-windows-exe
path: src-tauri/target/release/*.exe

- name: Upload Artifact (Windows|MSI)
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: MinecraftLanguageFileEditorL-windows-msi
path: src-tauri/target/release/bundle/msi/*.msi

- name: Upload Artifact (Windows|NSIS)
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: MinecraftLanguageFileEditor-windows-nsis
path: src-tauri/target/release/bundle/nsis/*.exe


- name: Upload Artifact (MacOS|DMG)
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: MinecraftLanguageFileEditor-macos-dmg
path: src-tauri/target/release/bundle/dmg/*.dmg

- name: Upload Artifact (MacOS|APP)
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: MinecraftLanguageFileEditor-macos-app
path: src-tauri/target/release/bundle/macos/*.app


- name: Upload Artifact (Ubuntu|DEB)
if: matrix.platform == 'ubuntu-20.04'
uses: actions/upload-artifact@v4
with:
name: MinecraftLanguageFileEditor-linux-deb
path: src-tauri/target/release/bundle/deb/*.deb

- name: Upload Artifact (Ubuntu|AppImage)
if: matrix.platform == 'ubuntu-20.04'
uses: actions/upload-artifact@v4
with:
name: MinecraftLanguageFileEditor-linux-appimage
path: src-tauri/target/release/bundle/appimage

0 comments on commit f8ad6eb

Please sign in to comment.