name: Rust on: push: branches: [ main, master ] pull_request: branches: [ main, master ] env: # Customize the profile here (e.g., release, debug) PROFILE: release jobs: build: runs-on: ubuntu-latest # Only target ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install Rust uses: actions-rs/toolchain@v1 with: toolchain: stable override: true - name: Build uses: actions-rs/cargo@v1 with: command: build args: --release # Or --debug, depending on the env.PROFILE - name: Run tests uses: actions-rs/cargo@v1 with: command: test args: --release # Or --debug, depending on the env.PROFILE ]