Skip to content

Commit b1e1283

Browse files
committed
ci: One-shot CodeArtifact publish workflow (to be reverted)
beep boop
1 parent 377aa0e commit b1e1283

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish to CodeArtifact
2+
3+
on:
4+
pull_request:
5+
paths: ['.github/workflows/publish-codeartifact.yml']
6+
workflow_dispatch:
7+
8+
permissions:
9+
id-token: write
10+
contents: read
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v5
17+
- uses: astral-sh/setup-uv@v7
18+
- uses: aws-actions/configure-aws-credentials@v4
19+
with:
20+
role-to-assume: arn:aws:iam::084060095745:role/codeartifact-github-actions-production
21+
aws-region: eu-west-2
22+
- name: Get CodeArtifact token
23+
run: |
24+
echo "CODEARTIFACT_TOKEN=$(aws codeartifact get-authorization-token \
25+
--domain flagsmith --domain-owner 084060095745 \
26+
--query authorizationToken --output text)" >> "$GITHUB_ENV"
27+
- run: uv build
28+
- run: |
29+
uv publish \
30+
--publish-url https://flagsmith-084060095745.d.codeartifact.eu-west-2.amazonaws.com/pypi/production-python/ \
31+
--username aws --password "$CODEARTIFACT_TOKEN" \
32+
dist/*

0 commit comments

Comments
 (0)