Skip to content

Commit c323a35

Browse files
committed
ci: One-shot CodeArtifact publish workflow (to be reverted)
beep boop
1 parent 4b475df commit c323a35

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
TOKEN=$(aws codeartifact get-authorization-token \
25+
--domain flagsmith-production --domain-owner 084060095745 \
26+
--query authorizationToken --output text)
27+
echo "::add-mask::$TOKEN"
28+
echo "CODEARTIFACT_TOKEN=$TOKEN" >> "$GITHUB_ENV"
29+
- run: uv build
30+
- run: |
31+
uv publish \
32+
--publish-url https://flagsmith-production-084060095745.d.codeartifact.eu-west-2.amazonaws.com/pypi/flagsmith-pypi-production/ \
33+
--username aws --password "$CODEARTIFACT_TOKEN" \
34+
dist/*

0 commit comments

Comments
 (0)