justine 6d39a7ec5b
Some checks failed
Rust-build / build (push) Failing after 50s
Update .gitea/workflows/build.yml
2023-07-17 17:03:29 +02:00

57 lines
1.4 KiB
YAML

name: Rust-build
on:
push:
branches:
- "main"
jobs:
build:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Check-out
uses: actions/checkout@v3
- name: Install stable toolchain
uses: https://github.com/actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cargo check
uses: https://github.com/actions-rs/cargo@v1
with:
command: check
- name: Test
run: cargo test
- name: Build
run: cargo build --release
- name: Configure cargo creds
run: |
echo '[registries.gitea]' > ~/.cargo/credentials.toml
echo 'token = "Bearer ${{ secrets.CARGO_API_TOKEN}}"' >> ~/.cargo/credentials.toml
cat ~/.cargo/credentials.toml
- name: Configure cargo
run: |
echo 'default = "gitea"' >> ~/.cargo/config.toml
echo ' ' >> ~/.cargo/config.toml
echo '[registries.gitea] ' >> ~/.cargo/config.toml
echo 'index = "https://gitea.squi.fr/Rust/_cargo-index.git"' >> ~/.cargo/config.toml
echo ' ' >> ~/.cargo/config.toml
echo '[net]' >> ~/.cargo/config.toml
echo 'git-fetch-with-cli = true' >> ~/.cargo/config.toml
- name: Publish
run: cargo publish