From 34a4bd79a57f447e00014ca2420d42b9b967689d Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Wed, 2 Aug 2023 14:44:51 +0200 Subject: [PATCH] ci: updated workflow files --- .github/workflows/buildnup.yml | 46 ------------------- .github/workflows/check_source_code.yml | 36 +++++++++++++++ ...get-branch.yml => check_target_branch.yml} | 0 .github/workflows/compile_release_build.yml | 45 ++++++++++++++++++ 4 files changed, 81 insertions(+), 46 deletions(-) delete mode 100644 .github/workflows/buildnup.yml create mode 100644 .github/workflows/check_source_code.yml rename .github/workflows/{target-branch.yml => check_target_branch.yml} (100%) create mode 100644 .github/workflows/compile_release_build.yml diff --git a/.github/workflows/buildnup.yml b/.github/workflows/buildnup.yml deleted file mode 100644 index ae884b4..0000000 --- a/.github/workflows/buildnup.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/check_source_code.yml b/.github/workflows/check_source_code.yml new file mode 100644 index 0000000..93928ec --- /dev/null +++ b/.github/workflows/check_source_code.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/target-branch.yml b/.github/workflows/check_target_branch.yml similarity index 100% rename from .github/workflows/target-branch.yml rename to .github/workflows/check_target_branch.yml diff --git a/.github/workflows/compile_release_build.yml b/.github/workflows/compile_release_build.yml new file mode 100644 index 0000000..295a1b8 --- /dev/null +++ b/.github/workflows/compile_release_build.yml @@ -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 \ No newline at end of file