CD #46
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: CD | |
on: | |
workflow_dispatch: {} | |
env: | |
HADOOP_USER_NAME: hive | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
server-id: github | |
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.email "[email protected]" | |
git config user.name "GitHub Actions" | |
- name: Prepare release | |
run: ./mvnw -B release:prepare | |
- name: Save version number in env | |
run: | | |
echo "VERSION=$(grep 'project.rel.org.ebyhr\\:trino-storage=' release.properties | cut -d'=' -f2)" >> $GITHUB_ENV | |
- uses: marvinpinto/[email protected] | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
automatic_release_tag: v${{ env.VERSION }} | |
title: v${{ env.VERSION }} | |
files: | | |
target/*.zip | |
- name: Publish JAR | |
run: ./mvnw -B release:perform -Darguments=-Dgpg.skip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload test report | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test report ${{ github.job }} | |
path: | | |
**/surefire-reports/TEST-*.xml | |
retention-days: 5 |