[CI] Add GraalVM JARs configuration to deploy-maven-central workflow
#2
Workflow file for this run
This file contains hidden or 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: Deploy to Maven Central | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| - '[0-9]+.[0-9]+.[0-9]+*' | |
| jobs: | |
| deploy: | |
| name: Deploy to Maven Central | |
| runs-on: [self-hosted, Linux, x64] | |
| timeout-minutes: 15 | |
| env: | |
| JAVA_HOME: /opt/jenkins/jdks/graal-23.1.0/jdk-21.0.3 | |
| MAVEN_HOME: /opt/maven | |
| GRAAL_JARS: /opt/graalJars | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup environment | |
| run: | | |
| echo "$JAVA_HOME/bin" >> $GITHUB_PATH | |
| echo "$MAVEN_HOME/bin" >> $GITHUB_PATH | |
| - name: Copy GraalVM JARs | |
| run: | | |
| mkdir -p graalJars && cp $GRAAL_JARS/* graalJars/ | |
| - name: Configure Maven settings | |
| run: | | |
| mkdir -p ~/.m2 | |
| cat > ~/.m2/settings.xml << 'EOF' | |
| <settings> | |
| <servers> | |
| <server> | |
| <id>central</id> | |
| <username>${env.MAVEN_USERNAME}</username> | |
| <password>${env.MAVEN_PASSWORD}</password> | |
| </server> | |
| </servers> | |
| <profiles> | |
| <profile> | |
| <id>gpg</id> | |
| <properties> | |
| <gpg.executable>gpg</gpg.executable> | |
| <gpg.keyname>${env.GPG_KEYNAME}</gpg.keyname> | |
| <gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase> | |
| </properties> | |
| </profile> | |
| </profiles> | |
| <activeProfiles> | |
| <activeProfile>gpg</activeProfile> | |
| </activeProfiles> | |
| </settings> | |
| EOF | |
| - name: Import GPG key | |
| run: | | |
| echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import | |
| env: | |
| GPG_TTY: $(tty) | |
| - name: Deploy to Maven Central | |
| run: | | |
| mvn clean deploy \ | |
| -pl tornado-api,tornado-runtime,tornado-matrices \ | |
| -am \ | |
| -P release \ | |
| -DskipTests \ | |
| --batch-mode | |
| env: | |
| MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
| MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | |
| GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |