Update dependencies #202
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: [master] | |
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: '22' | |
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 QEMU | |
uses: docker/setup-qemu-action@v3 | |
- 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 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} | |
TWITTER_TOKEN: ${{ secrets.TWITTER_TOKEN }} | |
TWITTER_SECRET: ${{ secrets.TWITTER_SECRET }} | |
TWITTER_CUSTOMER_KEY: ${{ secrets.TWITTER_CUSTOMER_KEY }} | |
TWITTER_CUSTOMER_SECRET: ${{ secrets.TWITTER_CUSTOMER_SECRET }} | |
- 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-rest=' 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 |