feat: add naming & publishing to crates #12
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: | |
bump-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Toolchain | |
run: rustup toolchain uninstall stable && rustup toolchain install beta -c rustfmt,clippy && rustup override set beta | |
- name: Bump version | |
run: 'cargo install vproj && vproj ${GITHUB_REF##*/} && git add . && git -c user.name="AlseinX" -c user.email="[email protected]" commit -am "chore: bump release version ${GITHUB_REF##*/}"' | |
- name: Run cargo fmt | |
run: cargo fmt --check --verbose | |
- name: Run cargo clippy | |
run: cargo clippy --verbose --features full | |
- name: Run tests | |
run: cargo test --verbose --features full | |
- name: Publish | |
id: publish-crates | |
uses: katyo/publish-crates@v2 | |
with: | |
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
- name: Publish Result | |
if: fromJSON(steps.publish-crates.outputs.published).* | |
run: | | |
LIST="${{ join(fromJSON(steps.publish-crates.outputs.published).*.name, ', ') }}" | |
echo "Published crates: $LIST" |