Skip to content

Update deployment.yml #6

Update deployment.yml

Update deployment.yml #6

Workflow file for this run

name: Deployment
on:
push:
tags: [ "v*" ]
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}
jobs:
Deploy:
name: Deploy-Crate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: bump-cargo-version
env:
RELEASE_TAG: ${{ github.ref }}
run: |
mv Cargo.toml Cargo.toml.orig
sed "s/0\\.0\\.0/${RELEASE_TAG##*\/v}/" Cargo.toml.orig >Cargo.toml
- name: commit-cargo-change
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git add Cargo.toml
git commit -m "Bump version to ${RELEASE_TAG##*\/v}"
- name: dry-run
run: cargo publish --dry-run
- name: publish
run: cargo publish