Merge branch 'master' of https://github.com/ikremniou/unrparc #1
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: Build and tag Rust project | |
on: | |
push: | |
branches: | |
- master | |
- "!github-actions[bot]" | |
workflow_dispatch: | |
jobs: | |
tag: | |
name: ${{ github.actor }} authorized build and tag | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- 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 | |
env: | |
GH_TOKEN: ${{ secrets.MY_TOKEN }} | |
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 }}" | |
- name: Push | |
uses: ad-m/git-push-action@master | |
with: | |
github_token: ${{ secrets.MY_TOKEN }} | |
branch: ${{ github.ref }} | |