Finish up GameVersion conversion (lets pretend libraries dont exist) #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#file: noinspection SpellCheckingInspection | |
name: CI | |
on: | |
- push | |
- workflow_dispatch | |
jobs: | |
changes: | |
name: Check file changes | |
runs-on: ubuntu-latest | |
outputs: | |
cargo: ${{ steps.changes.outputs.cargo }} | |
silo: ${{ steps.changes.outputs.silo }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
cargo: ['Cargo.*', 'Deny.toml', '**/*/Cargo.*'] | |
silo: ['Cargo.*', 'silo/**/*', 'modules/data/**/*', 'modules/net/**/*', 'modules/util/**/*'] | |
check: | |
name: Check code | |
needs: [ changes ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- if: needs.changes.outputs.cargo == 'true' | |
run: | | |
cargo install cargo-deny | |
cargo-deny check -c Deny.toml bans licenses sources | |
- uses: olix0r/cargo-action-fmt/setup@v2 | |
- run: cargo check --locked --message-format=json | cargo-action-fmt | |
- run: cargo test --locked --no-run --message-format=json | cargo-action-fmt | |
- run: cargo test --locked | |
metadata: | |
name: Deploy metadata site | |
needs: [ check, changes ] | |
#if: (github.event_name == 'push' && needs.changes.outputs.meta == 'true') || (github.event_name == 'workflow_dispatch') | |
if: false | |
runs-on: ubuntu-latest | |
concurrency: Metadata Site | |
environment: | |
name: Metadata Site | |
url: ${{ steps.deployment.outputs.url }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo run --locked --bin silo | |
- id: deployment | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: launchermeta | |
directory: _site |