Skip to content

Commit 3b817e1

Browse files
Enable upload to staging
2 parents 70b551f + 7d2704d commit 3b817e1

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

.github/workflows/on_external_dispatch.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ on:
1010
type: string
1111
description: Force version (vX.Y.Z-((rc|post)N))
1212
required: false
13-
publish_to_pypi:
13+
publish_packages:
1414
type: boolean
15-
description: Publish packages to PyPI?
15+
description: Publish packages on S3 and PyPI?
1616
required: true
1717
default: false
1818

@@ -26,3 +26,32 @@ jobs:
2626
git_ref: ${{ github.ref }}
2727
duckdb_git_ref: ${{ inputs.duckdb-sha }}
2828
force_version: ${{ inputs.force_version }}
29+
30+
upload_to_staging:
31+
name: Upload Artifacts to staging
32+
runs-on: ubuntu-latest
33+
needs: [ externally_triggered_build ]
34+
if: ${{ github.repository_owner == 'duckdb' && inputs.publish_packages }}
35+
steps:
36+
- name: Fetch artifacts
37+
uses: actions/download-artifact@v4
38+
with:
39+
pattern: '{sdist,wheel}*'
40+
path: artifacts/
41+
merge-multiple: true
42+
43+
- name: Authenticate with AWS
44+
uses: aws-actions/configure-aws-credentials@v4
45+
with:
46+
aws-region: 'us-east-2'
47+
aws-access-key-id: ${{ secrets.S3_DUCKDB_STAGING_ID }}
48+
aws-secret-access-key: ${{ secrets.S3_DUCKDB_STAGING_KEY }}
49+
50+
- name: Upload artifacts to S3 bucket
51+
shell: bash
52+
run: |
53+
DUCKDB_SHA="${{ inputs.duckdb-sha }}"
54+
aws s3 cp \
55+
artifacts \
56+
s3://duckdb-staging/${DUCKDB_SHA:0:7}/${{ github.repository }}/ \
57+
--recursive

.github/workflows/pypi_packaging.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,9 @@ jobs:
114114
115115
- uses: actions/upload-artifact@v4
116116
with:
117-
name: sdist-main
117+
name: sdist
118118
path: dist/*.tar.gz
119+
compression-level: 0
119120

120121
build_wheels:
121122
name: 'Wheel: ${{ matrix.python }}-${{ matrix.platform.cibw_system }}_${{ matrix.platform.arch }}'
@@ -186,3 +187,4 @@ jobs:
186187
with:
187188
name: wheel-${{ matrix.python }}-${{ matrix.platform.cibw_system }}_${{ matrix.platform.arch }}
188189
path: wheelhouse/*.whl
190+
compression-level: 0

0 commit comments

Comments
 (0)