diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..5ba8495 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,30 @@ +--- + name: Publish + + on: + push: + tags: + - 'v*' + branches: + - main + + workflow_dispatch: + + jobs: + publish_crate: + name: Publish crate + runs-on: 'ubuntu-latest' + steps: + - name: Check out the repo + uses: actions/checkout@v2 + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - run: cargo publish --token ${CRATES_TOKEN} + env: + CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}