Bumped version 0.2.6->0.2.7 #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
test: | |
runs-on: ${{matrix.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: [nightly, beta, stable] | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{matrix.rust}} | |
profile: minimal | |
- name: Run Tests | |
run: cargo test | |
publish: | |
runs-on: ubuntu-20.04 | |
needs: [test] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
- uses: olegtarasov/[email protected] | |
id: tagName | |
name: Get Tag Name | |
with: | |
tagRegex: "v(?<version>.*)" | |
- name: Set Package Version | |
env: | |
GIT_TAG_NAME: ${{ steps.tagName.outputs.version }} | |
run: sed -i "s/version = \"0.1.0\"/version = \"${GIT_TAG_NAME}\"/" Cargo.toml | |
- name: Cargo Login | |
env: | |
CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }} | |
run: cargo login $CARGO_TOKEN | |
- name: Cargo Publish Dry Run | |
run: cargo publish --dry-run | |
- name: Cargo Publish | |
run: cargo publish |