Skip to content

Commit

Permalink
feat: offline bundle builds
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeHD committed May 8, 2024
1 parent a1e9696 commit 1a87f4f
Show file tree
Hide file tree
Showing 11 changed files with 370 additions and 15 deletions.
28 changes: 20 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ jobs:
target: 'x86_64-pc-windows-msvc'
- platform: windows-latest
target: 'aarch64-pc-windows-msvc'

features:
- 'default'
- 'offline'

steps:
- uses: actions-rust-lang/setup-rust-toolchain@v1.8
Expand Down Expand Up @@ -92,10 +96,18 @@ jobs:

- name: Install dependencies
run: pnpm install

- name: (Windows) If we are building the offline version, bootstrap PokeRogue locally
if: matrix.features == 'offline'
run: .\bootstrap_pokerogue.cmd

- name: (Unix) If we are building the offline version, bootstrap PokeRogue locally
if: matrix.features == 'offline'
run: ./bootstrap_pokerogue.sh

- name: Build
# If we are compiling for Windows ARM, we can only support NSIS
run: cargo tauri build --target ${{ matrix.config.target }} ${{ matrix.config.target == 'aarch64-pc-windows-msvc' && '--bundles nsis' || '' }}
run: cargo tauri build --target ${{ matrix.config.target }} ${{ matrix.config.target == 'aarch64-pc-windows-msvc' && '--bundles nsis' || '' }} --features ${{ matrix.features }}
env:
RUSTFLAGS: -Awarnings
CC: clang
Expand Down Expand Up @@ -126,51 +138,51 @@ jobs:
if: matrix.config.platform == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: roguetop-${{ matrix.config.target }}-portable
name: roguetop-${{ matrix.features }}-${{ matrix.config.target }}-portable
path: RogueTop.zip

# Windows MSI
- name: (Windows) Upload .msi
if: matrix.config.platform == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: roguetop-${{ matrix.config.target }}-msi
name: roguetop-${{ matrix.features }}-${{ matrix.config.target }}-msi
path: src-tauri/target/${{ matrix.config.target }}/release/bundle/msi/*.msi

# Windows ARM only supports NSIS right now, but we should upload that too
- name: (Windows) Upload NSIS
if: matrix.config.platform == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: roguetop-${{ matrix.config.target }}-nsis
name: roguetop-${{ matrix.features }}-${{ matrix.config.target }}-nsis
path: src-tauri/target/${{ matrix.config.target }}/release/bundle/nsis/*.exe

# Ubuntu portable
- name: (Linux) Upload portable
if: matrix.config.platform == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: roguetop-${{ matrix.config.target }}-portable
name: roguetop-${{ matrix.features }}-${{ matrix.config.target }}-portable
path: src-tauri/target/${{ matrix.config.target }}/release/roguetop.tar.gz

# Ubuntu deb
- name: (Linux) Upload .deb
if: matrix.config.platform == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: roguetop-${{ matrix.config.target }}-deb
name: roguetop-${{ matrix.features }}-${{ matrix.config.target }}-deb
path: src-tauri/target/${{ matrix.config.target }}/release/bundle/deb/*.deb

- name: (Linux) Upload .appimage
if: matrix.config.platform == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: roguetop-${{ matrix.config.target }}-appimage
name: roguetop-${{ matrix.features }}-${{ matrix.config.target }}-appimage
path: src-tauri/target/${{ matrix.config.target }}/release/bundle/appimage/*.AppImage

- name: (MacOS) Upload .dmg
if: matrix.config.platform == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: roguetop-${{ matrix.config.target }}-dmg
name: roguetop-${{ matrix.features }}-${{ matrix.config.target }}-dmg
path: src-tauri/target/${{ matrix.config.target }}/release/bundle/dmg/*.dmg
Loading

0 comments on commit 1a87f4f

Please sign in to comment.