mirror of
https://github.com/an-anime-team/sleepy-launcher.git
synced 2024-11-22 04:40:06 +03:00
67 lines
1.5 KiB
YAML
67 lines
1.5 KiB
YAML
name: Build & Upload Launcher
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
paths: [ "src/**" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
paths: [ "src/**" ]
|
|
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build_and_upload:
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Install Deps
|
|
run: sudo apt install -y libgtk-4-1 libgtk-4-dev libadwaita-1-0 libadwaita-1-dev
|
|
|
|
- name: Build
|
|
run: cargo build --release --verbose
|
|
|
|
- name: Upload a Build Artifact
|
|
uses: actions/upload-artifact@v3.1.0
|
|
with:
|
|
name: Launcher
|
|
path: target/release/anime-game-launcher
|
|
|
|
build_and_upload_exp:
|
|
runs-on: ubuntu-latest
|
|
needs: build_and_upload
|
|
if: ${{ always() && needs.build_and_upload.result == 'failure' }}
|
|
|
|
container:
|
|
image: ubuntu:rolling
|
|
env:
|
|
DEBIAN_FRONTEND: noninteractive
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install Deps
|
|
run: |
|
|
apt update
|
|
apt install -y libgtk-4-1 libgtk-4-dev libadwaita-1-0 libadwaita-1-dev git rustc rustfmt cargo
|
|
|
|
- name: Get Submodules
|
|
run: git submodule update --init
|
|
|
|
- name: Build
|
|
run: cargo build --release --verbose
|
|
|
|
- name: Upload a Build Artifact
|
|
uses: actions/upload-artifact@v3.1.0
|
|
with:
|
|
name: Launcher
|
|
path: target/release/anime-game-launcher
|