Skip to content

Commit

Permalink
ci: crates publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Mogyuchi committed Feb 24, 2024
1 parent f345978 commit 2cc9f64
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
push:
branches: ["main"]

permissions: {}

jobs:
release-please:
if: github.repository.fork == false
Expand All @@ -26,6 +28,22 @@ jobs:
manifest-file: .github/release-please/.release-please-manifest.json
skip-github-pull-request: ${{ startsWith(github.event.head_commit.message, 'release:') && github.event.head_commit.author.name == env.RELEASE_PLEASE_AUTHOR }}

crates-publish:
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
permissions: {}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
dry-run: true
ignore-unpublished-changes: true

docker-publish:
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
Expand All @@ -37,7 +55,7 @@ jobs:
tag-name: ${{ needs.release-please.outputs.tag_name }}

publish-release:
needs: [release-please, docker-publish]
needs: [release-please, docker-publish, crates-publish]
if: ${{ needs.release-please.outputs.release_created }}
permissions:
contents: write
Expand Down

0 comments on commit 2cc9f64

Please sign in to comment.