Skip to content

Commit

Permalink
ci: fix release publish (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
rissson authored Nov 6, 2024
1 parent a376470 commit fd46be3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ name: Python CI
push:
branches:
- main
tags:
- "*"
pull_request:
branches:
- main
release:
types:
- released

env:
DEBIAN_FRONTEND: noninteractive
Expand Down Expand Up @@ -216,7 +217,7 @@ jobs:
environment: pypi
permissions:
id-token: write
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/python-kadmin-rs/version/')
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/python-kadmin-rs/version/')
steps:
- uses: actions/download-artifact@v4
with:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/ci-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ name: Rust CI
push:
branches:
- main
tags:
- "*"
pull_request:
branches:
- main
release:
types:
- released

env:
DEBIAN_FRONTEND: noninteractive
Expand Down Expand Up @@ -107,7 +108,7 @@ jobs:
extra_args: "--no-verify"
- crate: kadmin
extra_args: ""
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/')
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
steps:
Expand All @@ -120,5 +121,5 @@ jobs:
with:
tool: just
- run: just ci-build-deps
- if: github.event_name == 'push' && startsWith(github.ref, format('refs/tags/{0}/version/', matrix.crate))
- if: startsWith(github.ref, format('refs/tags/{0}/version/', matrix.crate))
run: cargo publish --package ${{ matrix.crate }} ${{ matrix.extra_args }}
2 changes: 1 addition & 1 deletion .github/workflows/release-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
if: github.event.pull_request.merged
outputs:
is-release: ${{ steps.meta.outputs.is-release }}
package: ${{ steps.meta.outputs.crates-name }}
package: ${{ steps.meta.outputs.crates-names }}
version: ${{ steps.meta.outputs.version-actual }}
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit fd46be3

Please sign in to comment.