Skip to content

chore(postgresql-dialect): release 0.32.0 (#1513) #58

chore(postgresql-dialect): release 0.32.0 (#1513)

chore(postgresql-dialect): release 0.32.0 (#1513) #58

name: Build and Push uber-jar to Google Cloud Storage
on:
# This allows manual activation of this action for testing.
workflow_dispatch:
push:
tags:
# Automatically build and push Docker image when a release (version) tag is pushed.
- v*
env:
GITHUB_SHA: ${{ github.sha }}
GITHUB_REF: ${{ github.ref }}
jobs:
setup-build-publish-deploy:
name: Setup, Build, and Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.CLOUD_SPANNER_PG_ADAPTER_SERVICE_ACCOUNT }}'
# Build the uber-jar
- name: Build
run: |
mvn package -Pshade -DskipTests
export VERSION=`echo $GITHUB_REF | awk -F/ '{print $NF}'`
echo $VERSION
cp "target/pgadapter.jar" "target/pgadapter-$VERSION.jar"
echo "uber_jar=target/pgadapter-$VERSION.jar" >> $GITHUB_ENV
echo "uber_jar_current=target/pgadapter.jar" >> $GITHUB_ENV
echo ${{ env.uber_jar }}
echo ${{ env.uber_jar_current }}
# Upload the jar to Google Cloud Storage
- id: 'upload-versioned-file'
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: ${{ env.uber_jar }}
destination: 'pgadapter-jar-releases'
parent: false
- id: 'overwrite-current-file'
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: ${{ env.uber_jar_current }}
destination: 'pgadapter-jar-releases'
parent: false