From 41a622e34dc573ffc8b99328be6068fc7559c2cf Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Thu, 9 Nov 2023 23:24:00 +0100 Subject: [PATCH] feat: add job to publish to crates.io --- .github/workflows/release.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f69ff96..4f3621f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -145,12 +145,12 @@ jobs: keyweave-*.tar.xz keyweave-x86_64-pc-windows-gnu/keyweave.exe - sign: + release: needs: - pre-check - build - name: Checksum and sign + name: Sign and Release runs-on: ubuntu-latest permissions: id-token: write @@ -195,7 +195,6 @@ jobs: github-token: ${{ secrets.PAT_TOKEN }} script: | const sha256sums = ${{ steps.homebrew-inputs.outputs.sha256sums }} - await github.rest.actions.createWorkflowDispatch({ owner: 'bartvdbraak', repo: 'homebrew-keyweave', @@ -205,4 +204,20 @@ jobs: version: '${{ needs.pre-check.outputs.version }}', sha256sums: JSON.stringify(sha256sums) } - }) \ No newline at end of file + }) + + publish: + needs: release + name: Publish crate + runs-on: ubuntu-latest + steps: + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - run: cargo publish --token ${CARGO_REGISTRY_TOKEN} + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} \ No newline at end of file