Publish to crates.io with each release

This commit is contained in:
fabianlindfors 2022-01-13 00:07:43 +01:00
parent 24e1d4b902
commit 0dd8272e9f

View File

@ -79,4 +79,21 @@ jobs:
# The shell expansion used below will remove everything up to the version number, leaving 0.0.1
run: docker build . --tag ${{ secrets.DOCKER_USER }}/reshape:${GITHUB_REF##*/v} --tag ${{ secrets.DOCKER_USER }}/reshape:latest
- name: Push Docker image
run: docker push --all-tags ${{ secrets.DOCKER_USER }}/reshape
run: docker push --all-tags ${{ secrets.DOCKER_USER }}/reshape
publish-crate:
runs-on: ubuntu-latest
needs: ["build-binary", "publish-docker"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Select Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Publish to crates.io
uses: actions-rs/cargo@v1
with:
command: publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}