forked from fastapi/sqlmodel
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.54 KB
/
publish.yml
File metadata and controls
44 lines (42 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Publish
on:
release:
types: [published]
jobs:
publish:
if: ${{ github.repository == 'Dandelion-Science/sqlmodel' }}
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version-file: ".python-version"
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- run: uv build
- uses: softprops/action-gh-release@v2
with:
files: |
dist/*.whl
dist/*.tar.gz
tag_name: ${{ github.event.release.tag_name }}
- uses: aws-actions/configure-aws-credentials@v6
with:
aws-region: ${{ vars.AWS_REGION }}
role-to-assume: ${{ vars.ARN_IAM_ROLE_GHA_CORE }}
- name: Get CodeArtifact authorization token
run: |
AWS_CODEARTIFACT_TOKEN=$(aws codeartifact get-authorization-token \
--domain ${{ vars.CODEARTIFACT_DOMAIN }} \
--domain-owner ${{ vars.CODEARTIFACT_DOMAIN_OWNER }} \
--query authorizationToken \
--output text)
echo "AWS_CODEARTIFACT_TOKEN=$AWS_CODEARTIFACT_TOKEN" >> $GITHUB_ENV
- run: uv publish
env:
UV_PUBLISH_USERNAME: aws
UV_PUBLISH_PASSWORD: ${{ env.AWS_CODEARTIFACT_TOKEN }}
UV_PUBLISH_URL: ${{ vars.CODEARTIFACT_PYPI_STORE_REPOSITORY_URL }}