"on":
push:
tags:
- "*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.1
with:
lfs: true
- uses: actions/cache@v2
with:
key: "${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}"
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
target
- uses: actions-rs/toolchain@v1
with:
default: true
profile: minimal
toolchain: stable
- uses: actions-rs/cargo@v1
with:
args: toml-cli
command: install
- id: get_version
run: "echo ::set-output name=VERSION::v$(toml get Cargo.toml package.version | tail -c +2 | head -c -2)"
shell: bash
- env:
GITHUB_TOKEN: "${{ secrets.COMMITTER_TOKEN }}"
id: create_release
uses: actions/create-release@v1.1.1
with:
draft: false
prerelease: false
release_name: "Release ${{ steps.get_version.outputs.VERSION }}"
tag_name: "${{ steps.get_version.outputs.VERSION }}"