Added build-publish
Some checks reported warnings
Rust-build / build (push) Has been cancelled

This commit is contained in:
Justine Pelletreau 2023-07-17 16:38:19 +02:00
parent 7a6598bf8f
commit 02c7379972

View File

@ -0,0 +1,43 @@
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
run: echo ${{ secrets.API_TOKEN_CONFIG }} >> ~/.cargo/credentials.toml
run: echo ${{ secrets.CARGO_CONFIG }} >> ~/.cargo/config.toml
- name: Publish
run: cargo publish