Skip to content

Bump a bunch of actions versions and format workflow files #54

Bump a bunch of actions versions and format workflow files

Bump a bunch of actions versions and format workflow files #54

Workflow file for this run

name: Windows
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
cancel-in-progress: true
defaults:
run:
shell: bash
# TODO: checkout duckdb-ext/duckdb
jobs:
windows:
name: Release
runs-on: windows-latest
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
strategy:
matrix:
# Add commits/tags to build against other DuckDB versions
duckdb_version: ["<submodule_version>"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: "true"
- uses: actions/setup-python@v5
with:
python-version: "3.7"
- name: Checkout DuckDB to version
# Add commits/tags to build against other DuckDB versions
if: ${{ matrix.duckdb_version != '<submodule_version>'}}
run: |
cd duckdb
git checkout ${{ matrix.duckdb_version }}
cd ../duckdb-ext/duckdb
git checkout ${{ matrix.duckdb_version }}
- name: Build extension
run: |
dir duckdb-ext/duckdb/src/include
make release
- uses: actions/upload-artifact@v4
with:
name: linux-extensions-64-aarch64
path: |
build/release/extension/duckdb-athena-extension/athena.duckdb_extension
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.OIDC_ROLE_ARN }}
aws-region: ${{ secrets.S3_REGION }}
- name: Deploy
env:
BUCKET_NAME: ${{ secrets.S3_BUCKET }}
run: |
cd duckdb
git fetch --tags
export DUCKDB_VERSION=`git tag --points-at HEAD`
export DUCKDB_VERSION=${DUCKDB_VERSION:=`git log -1 --format=%h`}
cd ..
if [[ "$BUCKET_NAME" == "" ]] ; then
echo 'No bucket set, skipping'
elif [[ "$GITHUB_REF" =~ ^(refs/tags/v.+)$ ]] ; then
python -m pip install awscli
./scripts/extension-upload.sh athena ${{ github.ref_name }} $DUCKDB_VERSION windows_amd64 $BUCKET_NAME true
elif [[ "$GITHUB_REF" =~ ^(refs/heads/main)$ ]] ; then
python -m pip install awscli
./scripts/extension-upload.sh athena `git log -1 --format=%h` $DUCKDB_VERSION windows_amd64 $BUCKET_NAME false
fi