mirror of
https://github.com/project-gauntlet/gauntlet.git
synced 2025-12-23 10:35:53 +00:00
53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
name: setup linux
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
command:
|
|
required: true
|
|
type: string
|
|
upload-artifact:
|
|
default: false
|
|
type: boolean
|
|
github-release-id:
|
|
type: string
|
|
|
|
jobs:
|
|
run-on-linux:
|
|
runs-on: ubuntu-22.04
|
|
timeout-minutes: 60
|
|
steps:
|
|
- run: sudo apt-get update
|
|
- run: sudo apt-get install -y protobuf-compiler
|
|
|
|
# needed for wayland
|
|
- run: sudo apt-get install -y libxkbcommon-dev
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
registry-url: "https://registry.npmjs.org"
|
|
scope: '@project-gauntlet'
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
|
|
|
- run: npm ci
|
|
|
|
- run: ${{ inputs.command }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
|
|
GITHUB_RELEASE_ID: ${{ inputs.github-release-id }}
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
if: ${{ inputs.upload-artifact }}
|
|
with:
|
|
name: 'gauntlet-x86_64-linux.tar.gz'
|
|
path: 'target/x86_64-unknown-linux-gnu/release/archive/gauntlet-x86_64-linux.tar.gz'
|
|
if-no-files-found: 'error'
|
|
retention-days: 7
|