Skip to content

Presto Stable Release Workflow #9

Presto Stable Release Workflow

Presto Stable Release Workflow #9

Workflow file for this run

name: Presto Stable Release Workflow
on:
workflow_dispatch:
jobs:
presto-release:
name: Presto Stable Release Workflow
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout Presto source
uses: actions/checkout@v4
with:
ref: master
show-progress: false
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Configure Git
run: |
git config --global --add safe.directory ${{github.workspace}}
git config --global user.email "[email protected]"
git config --global user.name "oss-release-bot"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git config pull.rebase false
- name: Set Maven version
run: |
unset MAVEN_CONFIG && ./mvnw versions:set -DremoveSnapshot -ntp
- name: Get Presto release version
id: get-version
run: |
PRESTO_RELEASE_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate \
-Dexpression=project.version -q -ntp -DforceStdout | tail -n 1)
echo "PRESTO_RELEASE_VERSION=$PRESTO_RELEASE_VERSION" >> $GITHUB_OUTPUT
- name: Update version in master
env:
PRESTO_RELEASE_VERSION: ${{ steps.get-version.outputs.PRESTO_RELEASE_VERSION }}
run: |
git reset --hard
unset MAVEN_CONFIG && ./mvnw release:prepare --batch-mode \
-DskipTests \
-DautoVersionSubmodules \
-DdevelopmentVersion=${{ env.PRESTO_RELEASE_VERSION }} \
-DreleaseVersion=${{ env.PRESTO_RELEASE_VERSION }}
git push --follow-tags origin master
- name: Push release branch
env:
PRESTO_RELEASE_VERSION: ${{ steps.get-version.outputs.PRESTO_RELEASE_VERSION }}
run: |
git checkout -b release-${{ env.PRESTO_RELEASE_VERSION }}
git push origin release-${{ env.PRESTO_RELEASE_VERSION }}