Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
kafai-lam committed May 18, 2024
1 parent 64e9b62 commit 94b4476
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ on:

env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: index
BUCKET: wheelhouse
BUCKET_ACCESS_URL: https://wheelhouse.kafai.eu.org
AWS_S3_ENDPOINT_URL: https://86099e5f6de2cd6346db01f48072efa4.r2.cloudflarestorage.com

jobs:
deploy:
Expand All @@ -22,6 +24,9 @@ jobs:
- name: Setup Github CLI
uses: sersoft-gmbh/setup-gh-cli-action@v2

- name: Setup AWS CLI
uses: unfor19/install-aws-cli-action@v1

- name: Setup Python
uses: actions/setup-python@v4
with:
Expand All @@ -34,8 +39,11 @@ jobs:
run: |
dumb-pypi --output-dir build \
--title "Odoo Contrib Pypi" \
--packages-url https://github.com/${{ github.repository }}/releases/download/${{ env.RELEASE_TAG }} \
--package-list-json <(gh api /repos/${{ github.repository }}/releases/tags/${{ env.RELEASE_TAG }} --jq '.assets[]| {filename: .name, upload_timestamp: .updated_at|fromdateiso8601, uploaded_by: .uploader.login}')
--packages-url ${{ env.BUCKET_ACCESS_URL }} \
--package-list-json <(aws s3api list-objects-v2 --endpoint-url ${{ env.AWS_S3_ENDPOINT_URL }} --bucket ${{ env.BUCKET }} --output json | jq -c '.Contents[] | {filename: .Key, upload_timestamp: .LastModified | sub("\\.[0-9]*";"") | sub("\\+00:00$";"Z") | fromdate}')
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Upload Page Artifacts
uses: actions/upload-pages-artifact@v2
Expand Down

0 comments on commit 94b4476

Please sign in to comment.