This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
Update README.md #12
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: Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
new_tag: ${{ steps.create_tag.outputs.new_tag }} | |
steps: | |
- uses: actions/checkout@main | |
- name: Generate new tag (dry run) | |
uses: mathieudutour/github-tag-action@v6.1 | |
id: get_new_version | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
dry_run: true | |
- name: Update Cargo.toml version | |
run: | | |
pwd | |
ls -l | |
sed -i "s/version = \".*\"/version = \"${{ steps.get_new_version.outputs.new_version }}\"/" Cargo.toml | |
grep version Cargo.toml | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Bumped Cargo.toml version to ${{ steps.get_new_version.outputs.new_version }} | |
- name: Create tag | |
uses: mathieudutour/github-tag-action@v6.1 | |
id: create_tag | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release on crates.io | |
uses: actions-rs/cargo@v1 | |
with: | |
command: publish | |
args: --token ${{ secrets.CRATES_IO_TOKEN }} |