Skip to content

workflows: Fix checkout #33

workflows: Fix checkout

workflows: Fix checkout #33

Workflow file for this run

name: Deploy
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions-rs/toolchain@v1.0.7
with:
toolchain: stable
override: true
- name: Build
run: cargo build
- name: Extract version from tag
id: get_version
run: echo "::set-output name=version::${GITHUB_REF/refs\/tags\//}"
- name: Login to crates.io
uses: actions-rs/cargo@v1
with:
command: login
args: ${{ secrets.CARGO }}
- name: Set and publish workspace crates
run: |
cargo install cargo-workspaces
cargo workspaces version custom ${{ steps.get_version.outputs.version }} \
--exact --yes --no-individual-tags \
-m "Commit new release ${{ steps.get_version.outputs.version }}"
cargo workspaces publish --yes --no-verify