Skip to content

Add version increment v2 #6

Add version increment v2

Add version increment v2 #6

name: Build and tag Rust project
on:
push:
branches:
- master
workflow_dispatch:
jobs:
release:
name: ${{ github.actor }} authorized build and tag
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build package
run: cargo build --release --locked
- name: Run package tests
run: cargo test
- name: Generate new version
uses: anothrNick/github-tag-action@1.64.0
env:
GITHUB_TOKEN: ${{ secrets.MY_TOKEN }}
DEFAULT_BUMP: patch
DRY_RUN: true
id: bump_version
- name: Set package version
run: |
cargo install cargo-edit
cargo set-version ${{ steps.bump_version.outputs.new_tag }}
- name: Tag
uses: anothrNick/github-tag-action@1.64.0
env:
GITHUB_TOKEN: ${{ secrets.MY_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
- name: Commit
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git commit -am "chore: bump version to ${{ steps.bump_version.outputs.new_tag }}"
git push origin master --follow-tags