Skip to content

Commit

Permalink
Show ~/.m2/toolchains.xml changes with actions/setup-java
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan202 committed Jan 4, 2025
1 parent a3aaf7c commit 73ed623
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Publish tagged Picnic release variant to GitHub Packages
on:
push:
tags:
- 'v*-picnic-*'
permissions:
contents: read
jobs:
Expand All @@ -24,6 +22,8 @@ jobs:
objects.githubusercontent.com:443
oss.sonatype.org:443
repo.maven.apache.org:443
- name: Show original `~/.m2/toolchains.xml`.
run: cat ~/.m2/toolchains.xml || echo "File is absent"
# XXX: We're using `actions/setup-java` here because
# `s4u/setup-maven-action` does not appear to support the multi-version
# `java-version` syntax in a way that also causes both versions to be
Expand All @@ -36,19 +36,13 @@ jobs:
24-ea
17
distribution: temurin
- name: Show `~/.m2/toolchains.xml` after `actions/setup-java`.
run: cat ~/.m2/toolchains.xml
- name: Check out code and set up Maven
uses: s4u/setup-maven-action@9a27433d289dd99d73851f653607c39d3444e8ba # v1.17.0
uses: s4u/setup-maven-action@4f7fb9d9675e899ca81c6161dadbba0189a4ebb1 # v1.18.0
with:
java-version: 17
java-distribution: temurin
maven-version: 3.9.9
- name: Determine and export release version
run: echo "RELEASE_VERSION=${GITHUB_REF_NAME#v*}" >> $GITHUB_ENV
- name: Configure release version
run: mvn versions:set -DnewVersion=${{ env.RELEASE_VERSION }}
- name: Publish package
run: mvn -B deploy -DaltDeploymentRepository=github::https://maven.pkg.github.com/PicnicSupermarket/error-prone
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Remove installed project artifacts
run: mvn dependency:purge-local-repository -DmanualInclude='${project.groupId}' -DresolutionFuzziness=groupId
- name: Show `~/.m2/toolchains.xml` after `actions/setup-java` and `s4u/setup-maven-action`.
run: cat ~/.m2/toolchains.xml

0 comments on commit 73ed623

Please sign in to comment.