Basic punctuation support #3
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
on: | |
pull_request: | |
branches: [master] | |
types: [closed] | |
name: Release to crates.io | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.79.0 | |
override: true | |
- name: Install cargo-release | |
run: | | |
curl -LsSf https://github.com/crate-ci/cargo-release/releases/download/v0.25.10/cargo-release-v0.25.10-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ${CARGO_HOME:-~/.cargo}/bin | |
- name: Setup Git | |
run: | | |
git config --global user.name "${{ github.actor }}" | |
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" | |
git fetch --unshallow | |
git fetch --tags | |
- name: Release to crates.io | |
run: | | |
git checkout master | |
cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
cargo release --no-confirm --execute | |
- name: Create a GitHub release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body: 'Release ${{ steps.release.outputs.version }}' | |
tag_name: $( echo '${{ github.head_ref }}' | sed 's?release/??' ) |