External Dispatch #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Builds triggered externally by DuckDB | |
on: | |
workflow_dispatch: | |
inputs: | |
duckdb-sha: | |
type: string | |
description: The DuckDB SHA to build against | |
required: true | |
force_version: | |
type: string | |
description: Force version (vX.Y.Z-((rc|post)N)) | |
required: false | |
publish_packages: | |
type: boolean | |
description: Publish packages on S3 and PyPI? | |
required: true | |
default: false | |
jobs: | |
externally_triggered_build: | |
name: Build and test releases | |
uses: ./.github/workflows/pypi_packaging.yml | |
with: | |
minimal: false | |
testsuite: all | |
git_ref: ${{ github.ref }} | |
duckdb_git_ref: ${{ inputs.duckdb-sha }} | |
force_version: ${{ inputs.force_version }} | |
upload_to_staging: | |
name: Upload Artifacts to staging | |
runs-on: ubuntu-latest | |
needs: [ externally_triggered_build ] | |
if: ${{ github.repository_owner == 'duckdb' && inputs.publish_packages }} | |
steps: | |
- name: Fetch artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: '{sdist,wheel}*' | |
path: artifacts/ | |
merge-multiple: true | |
- name: Authenticate with AWS | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-region: 'us-east-2' | |
aws-access-key-id: ${{ secrets.S3_DUCKDB_STAGING_ID }} | |
aws-secret-access-key: ${{ secrets.S3_DUCKDB_STAGING_KEY }} | |
- name: Upload artifacts to S3 bucket | |
shell: bash | |
run: | | |
DUCKDB_SHA="${{ inputs.duckdb-sha }}" | |
aws s3 cp \ | |
artifacts \ | |
s3://duckdb-staging/${DUCKDB_SHA:0:10}/${{ github.repository }}/ \ | |
--recursive |