Update dependencies #86
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: Release with Maven | |
on: | |
push: | |
branches: [main] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up the JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Configure Problem Matchers | |
run: | | |
echo "::add-matcher::.github/problem-matcher.json" | |
echo "::remove-matcher owner=java::" | |
- name: Configure Git user | |
run: | | |
git config user.name "${{ github.event.head_commit.committer.name }}" | |
git config user.email "${{ github.event.head_commit.committer.email }}" | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Prepare release | |
run: ./mvnw -B release:prepare | |
- name: Build and push Docker image | |
run: | | |
./docker-build.sh | |
- name: Save version number in env | |
run: | | |
echo "VERSION=$(grep 'project.rel.pl.net.was\\:trino-git=' release.properties | cut -d'=' -f2)" >> $GITHUB_ENV | |
- name: Publish JAR | |
run: ./mvnw -B release:perform -Darguments="-Dgpg.skip -Dmaven.deploy.skip=true" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run JReleaser | |
uses: jreleaser/release-action@v2 | |
env: | |
JRELEASER_PROJECT_VERSION: ${{ env.VERSION }} | |
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
setup-java: false | |
- name: Upload test report | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test report ${{ github.job }} | |
path: | | |
**/surefire-reports/TEST-*.xml | |
out/jreleaser/trace.log | |
out/jreleaser/output.properties | |
retention-days: 5 |