mirror of
https://github.com/Cyrix126/gupaxx.git
synced 2024-12-22 14:49:21 +00:00
77cc9faf62
wrong path
91 lines
2.9 KiB
YAML
91 lines
2.9 KiB
YAML
name: Release Artifacts
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUST_BACKTRACE: "full"
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [macos-13, ubuntu-latest]
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo
|
|
target
|
|
key: ${{ matrix.os }}
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
if [ "$RUNNER_OS" == "Linux" ]; then
|
|
sudo apt update
|
|
sudo apt install -y libgtk-3-dev mingw-w64
|
|
rustup target install x86_64-pc-windows-gnu
|
|
elif [ "$RUNNER_OS" == "macOS" ]; then
|
|
cargo install cargo-bundle
|
|
rustup target install aarch64-apple-darwin
|
|
rustup target install x86_64-apple-darwin
|
|
fi
|
|
shell: bash
|
|
|
|
|
|
- name: Build
|
|
run: |
|
|
if [ "$RUNNER_OS" == "macOS" ]; then
|
|
cargo bundle --release --target x86_64-apple-darwin
|
|
cargo bundle --release --target aarch64-apple-darwin
|
|
mv target/x86_64-apple-darwin/release/bundle/osx/Gupaxx.app Gupaxx-macos-x64.app
|
|
mv target/aarch64-apple-darwin/release/bundle/osx/Gupaxx.app Gupaxx-macos-arm64.app
|
|
cargo bundle --release --target x86_64-apple-darwin --features=bundle
|
|
cargo bundle --release --target aarch64-apple-darwin --features=bundle
|
|
mv target/x86_64-apple-darwin/release/bundle/osx/Gupaxx.app Gupaxx-macos-x64.app_b
|
|
mv target/aarch64-apple-darwin/release/bundle/osx/Gupaxx.app Gupaxx-macos-arm64.app_b
|
|
tar -cf macos.tar Gupaxx-macos-arm64.app Gupaxx-macos-x64.app Gupaxx-macos-arm64.app_b Gupaxx-macos-x64.app_b
|
|
elif [ "$RUNNER_OS" == "Linux" ]; then
|
|
cargo build --release --target x86_64-unknown-linux-gnu
|
|
mv target/x86_64-unknown-linux-gnu/release/gupaxx .
|
|
cargo build --release --target x86_64-unknown-linux-gnu --features=bundle
|
|
mv target/x86_64-unknown-linux-gnu/release/gupaxx gupaxx_b
|
|
tar -cf linux.tar gupaxx gupaxx_b
|
|
cargo build --release --target x86_64-pc-windows-gnu
|
|
mv target/x86_64-pc-windows-gnu/release/gupaxx.exe .
|
|
cargo build --release --target x86_64-pc-windows-gnu --features=bundle
|
|
mv target/x86_64-pc-windows-gnu/release/gupaxx.exe gupaxx_b.exe
|
|
tar -cf windows.tar gupaxx.exe gupaxx_b.exe
|
|
fi
|
|
shell: bash
|
|
|
|
- name: Archive (Windows)
|
|
if: ${{ runner.os == 'Linux' }}
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: windows
|
|
path: windows.tar
|
|
|
|
- name: Archive
|
|
if: ${{ runner.os == 'macOS' }}
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: macos
|
|
path: macos.tar
|
|
|
|
- name: Archive (Linux)
|
|
if: ${{ runner.os == 'Linux' }}
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: linux
|
|
path: linux.tar
|