Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test to figure out what's wrong #18

Closed
wants to merge 18 commits into from
37 changes: 34 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@ jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
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
Expand All @@ -44,6 +50,31 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Build with Maven and deploy to Artifact Registry
run: mvn --batch-mode -P ssb-bip deploy
- 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
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>no.ssb.crypto.tink</groupId>
<artifactId>tink-fpe-java</artifactId>
<version>0.0.9-SNAPSHOT</version>
<version>0.0.9</version>
<name>Tink FPE Java</name>
<description>Format-Preserving Encryption support for Google Tink</description>

Expand Down Expand Up @@ -51,7 +51,7 @@
<scm>
<developerConnection>scm:git:https://github.com/${github.repository}.git</developerConnection>
<url>https://github.com/${github.repository}</url>
<tag>HEAD</tag>
<tag>v0.0.9</tag>
</scm>

<dependencies>
Expand Down
Loading