Skip to content

chore(deps): update dependency com.diffplug.spotless:spotless-maven-p… #391

chore(deps): update dependency com.diffplug.spotless:spotless-maven-p…

chore(deps): update dependency com.diffplug.spotless:spotless-maven-p… #391

Workflow file for this run

# Workflow for deploying Sorald
#
# Note that actions are specified by commit hash. This is to avoid the security
# risk of someone injecting malicious code into a release and then simply
# changing a tag.
name: deploy
on:
push:
branches: [ master ]
env:
JAVA_DISTRIBUTION: 'adopt'
jobs:
deploy:
if: ${{ github.repository == 'ASSERT-KTH/sorald' }}
runs-on: ubuntu-latest
environment: Deploy
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Setup for Java build
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3.12.0
with:
java-version: 11
java-package: jdk
architecture: x64
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Build
run: mvn -B install -DskipTests
- name: Get Sorald version
id: get-sorald-version
shell: bash
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout -pl sorald)
echo "::set-output name=version::$VERSION"
- name: Setup Java for deploy
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3.12.0
with: # running setup-java again overwrites the settings.xml
java-version: 11
java-package: jdk
architecture: x64
distribution: ${{ env.JAVA_DISTRIBUTION }}
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.SORALD_SIGNING_KEY }}
- name: Publish to Maven Central
if: ${{ contains(steps.get-sorald-version.outputs.version, 'SNAPSHOT') }}
run: |
mvn -Prelease deploy -pl se.kth.castor:sorald-parent # Fully qualified artifact ID is required
mvn -Prelease deploy -pl sorald-api
mvn -Prelease deploy -pl sorald -DskipTests
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_CENTRAL_TOKEN: ${{ secrets.OSSRH_PASSWORD }}