Skip to content

Test to figure out what's wrong #68

Test to figure out what's wrong

Test to figure out what's wrong #68

Workflow file for this run

name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
REGISTRY: europe-north1-docker.pkg.dev/artifact-registry-5n/dapla-pseudo-maven
IMAGE: tink-fpe-java
TAG: ${{ github.ref_name }}-${{ github.sha }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.DAPLA_BOT_APP_ID }}
private-key: ${{ secrets.DAPLA_BOT_PRIVATE_KEY }}
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 21
distribution: zulu
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v1.1.1
with:
workload_identity_provider: "projects/848539402404/locations/global/workloadIdentityPools/gh-actions/providers/gh-actions"
service_account: "gh-actions-dapla-pseudo@artifact-registry-5n.iam.gserviceaccount.com"
token_format: access_token
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Maven release
id: release_jar
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
mvn --batch-mode release:prepare -P ssb-bip package -DskipTests -DdryRun=true
mvn --batch-mode release:perform -DdryRun=true
echo "tag=v0.0.11" >> $GITHUB_OUTPUT
- name: Create GitHub release draft
uses: release-drafter/release-drafter@v5
id: create_github_release
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
with:
tag: ${{ steps.release_jar.outputs.tag }}
- name: Upload assets to GitHub release draft
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
ARTIFACT_ID=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
# Get all files matching the artifact id and version (source, javadoc, etc.)
ARTIFACT_GLOB=(./target/$ARTIFACT_ID-$VERSION*.jar)
for file in "${ARTIFACT_GLOB[@]}"; do
ls $file
done