chore(postgresql-dialect): release 0.25.0 (#1113) #48
Workflow file for this run
This file contains 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: 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@v1' | |
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@v1' | |
with: | |
path: ${{ env.uber_jar }} | |
destination: 'pgadapter-jar-releases' | |
parent: false | |
- id: 'overwrite-current-file' | |
uses: 'google-github-actions/upload-cloud-storage@v1' | |
with: | |
path: ${{ env.uber_jar_current }} | |
destination: 'pgadapter-jar-releases' | |
parent: false |