cd: finalize cd #1
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: Bump Version | |
on: | |
pull_request: | |
types: [closed] | |
branches: [main] | |
jobs: | |
bump-version: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.merged == true | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Build semrel | |
run: cargo build --release | |
- name: Update version | |
run: ./target/release/semrel update | |
- name: Get new version | |
id: set-new-version | |
run: echo "::set-output name=version::$(./target/release/semrel show current)" | |
- name: Commit changes | |
env: | |
VERSION: ${{ steps.set-new-version.outputs.version }} | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git commit Cargo.* -m 'release: ${VERSION}' |