ci: updated workflow files

This commit is contained in:
Observer KRypt0n_ 2023-08-02 14:44:51 +02:00
parent 6c58d715be
commit 34a4bd79a5
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
4 changed files with 81 additions and 46 deletions

View file

@ -1,46 +0,0 @@
name: Build & Upload Launcher
on:
push:
branches: [ "main", "next" ]
paths: [ "src/**" ]
pull_request:
branches: [ "main", "next" ]
paths: [ "src/**" ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build_and_upload:
runs-on: ubuntu-latest
container:
image: ubuntu:devel
env:
DEBIAN_FRONTEND: noninteractive
steps:
- name: Install Deps
run: |
apt update
apt install -y libgtk-4-1 libgtk-4-dev libadwaita-1-0 libadwaita-1-dev git curl openssl libssl-dev
- uses: dtolnay/rust-toolchain@stable
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- 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

36
.github/workflows/check_source_code.yml vendored Normal file
View file

@ -0,0 +1,36 @@
name: Check source code
on:
push:
branches: [ "next" ]
paths: [ "src/**" ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
check_source_code:
runs-on: ubuntu-latest
container:
image: ubuntu:devel
env:
DEBIAN_FRONTEND: noninteractive
steps:
- name: Install dependencies
run: |
apt update
apt install -y libgtk-4-dev libadwaita-1-dev git curl
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Checkout
uses: actions/checkout@v3
- name: Check source code
run: cargo check --verbose

View file

@ -0,0 +1,45 @@
name: Compile release build
on:
push:
branches: [ "main" ]
paths: [ "src/**" ]
release:
types: [published]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build_and_upload:
runs-on: ubuntu-latest
container:
image: ubuntu:devel
env:
DEBIAN_FRONTEND: noninteractive
steps:
- name: Install dependencies
run: |
apt update
apt install -y libgtk-4-dev libadwaita-1-dev git curl
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Checkout
uses: actions/checkout@v3
- name: Compile release build
run: cargo build --release --verbose
- name: Upload artifact
uses: actions/upload-artifact@v3.1.0
with:
name: Release build
path: target/release/anime-game-launcher