Skip to content

Commit

Permalink
Add publish job to publish from CI on tags (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasRosenstein authored Jan 29, 2025
1 parent 78dd6a7 commit c4a129a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changelog/_unreleased.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[[entries]]
id = "69495c76-ca33-4089-87df-ee64b280c939"
type = "improvement"
description = "publish from CI"
author = "@NiklasRosenstein"
22 changes: 22 additions & 0 deletions .github/workflows/on-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,25 @@ jobs:
with: { python-version: "${{ matrix.python-version }}" }
- run: slap config --venv-type=uv && slap install --link --no-venv-check ${{ matrix.only }}
- run: cd examples/docker-manual && kraken run :dockerBuild :sub:helloWorld

publish:
runs-on: ubuntu-latest
needs: test
environment: release
permissions:
id-token: write
if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push'

steps:
- uses: actions/checkout@v4
- uses: NiklasRosenstein/slap@gha/install/v1
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Build dist
run: slap publish --dry --build-directory dist/
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/

0 comments on commit c4a129a

Please sign in to comment.