Skip to content

rust

rust #22

Workflow file for this run

name: Rust
env:
CARGO_TERM_COLOR: always
on:
push:
branches: [ "main", "master", "prod" ]
tags: [ "v*.*.*" ]
schedule:
- cron: "30 9 * * 5"
workflow_dispatch:
inputs:
publish:
default: true
description: 'Publish'
required: true
type: boolean
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- nightly
steps:
- uses: actions/checkout@v3
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo build -v
- run: cargo test --all --all-features -v
features:
if: ${{ github.event.inputs.publish }}
name: Features
runs-on: ubuntu-latest
strategy:
matrix:
package:
- concision-derive
- concision-macros
steps:
- uses: actions/checkout@v3
- name: Publish (${{matrix.package}})
run: cargo publish --all-features --package ${{ matrix.package }} --verbose --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
publish:
if: ${{ github.event.inputs.publish }}
name: Publish
needs: features
runs-on: ubuntu-latest
strategy:
matrix:
package:
- concision
steps:
- uses: actions/checkout@v3
- name: Publish (${{matrix.package}})
run: cargo publish --all-features --package ${{ matrix.package }} --verbose --token ${{ secrets.CARGO_REGISTRY_TOKEN }}