Skip to content

Commit 556df07

Browse files
committed
chore: add .github workflow to publish the package
1 parent 1d91d56 commit 556df07

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/publish.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: 'Publish on pypi'
2+
on:
3+
release:
4+
types: [created]
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
publish:
10+
if: startsWith(github.ref, 'refs/tags/')
11+
runs-on: ubuntu-latest
12+
environment:
13+
name: pypi
14+
url: https://pypi.org/p/adk-dynamodb-session
15+
permissions:
16+
contents: read
17+
packages: write
18+
attestations: write
19+
id-token: write
20+
21+
steps:
22+
23+
- name: Checkout (GitHub)
24+
uses: actions/checkout@v3
25+
26+
- name: Login to GitHub Container Registry
27+
uses: docker/login-action@v2
28+
with:
29+
registry: ghcr.io
30+
username: ${{ github.repository_owner }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Build and run dev container task
34+
uses: devcontainers/[email protected]
35+
with:
36+
imageName: ghcr.io/ksachdeva/adk-chatkit
37+
cacheFrom: ghcr.io/ksachdeva/adk-chatkit
38+
runCmd: uv build --package adk-chatkit
39+
40+
- name: Publish package distributions to PyPI
41+
uses: pypa/gh-action-pypi-publish@release/v1
42+
with:
43+
packages-dir: dist
44+
skip-existing: true
45+
verbose: true

0 commit comments

Comments
 (0)