Improved release version options and add cache
@@ -7,11 +7,11 @@ on:
type: choice
description: "Which version you'd like to release?"
options:
- - major
- - minor
- - patch
- - rc
- - release
+ - major (_.X.X)
+ - minor (X._.X)
+ - patch (X.X._)
+ - rc (X.X.X-rc)
+ - release (removes rc)
required: true
jobs:
@@ -22,16 +22,25 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
+ - uses: actions-rs/toolchain@v1
+ with:
+ profile: minimal
+ toolchain: stable
+ - uses: Swatinem/rust-cache@v1
- name: Install cargo-edit
uses: actions-rs/install@v0.1
with:
crate: cargo-edit
version: latest
+ - name: Extracting version from input
+ run: |
+ VERSION=$(echo "${{github.event.inputs.new-version}}" | sed 's/ (.*)$//')
+ echo "VER=$VERSION" >> $GITHUB_ENV
- name: Bump new version in TOML files
run: |
OLD_VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
echo "OLD=$OLD_VERSION" >> $GITHUB_ENV
- cargo set-version --workspace --bump ${{github.event.inputs.new-version}}
+ cargo set-version --workspace --bump ${{ env.VER }}
NEW_VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
echo "NEW=$NEW_VERSION" >> $GITHUB_ENV
- name: Create release branch
@@ -43,9 +52,6 @@ jobs:
git config user.email noreply@github.com
- name: Updating Changelog and Dockerfile
run: .github/scripts/Bump.sh ${{ env.OLD }} ${{ env.NEW }}
- - uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- run: cargo check
- name: Commit changelog and manifest files
id: make-commit
