[maven-release-plugin] prepare release v2.3.1 #7
Workflow file for this run
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
on: | |
push: | |
tags: | |
- "v*" | |
workflow_dispatch: | |
name: Deploy Tagged Release | |
env: | |
MAVEN_VERSION: 3.9.8 | |
JAVA_DISTRO: 'temurin' | |
JAVA_VERSION_FILE: .java-version | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
jobs: | |
deploy-to-nexus: | |
name: Maven Central Deployment | |
runs-on: ubuntu-20.04 | |
permissions: | |
actions: read | |
contents: read | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
with: | |
submodules: recursive | |
# ------------------------- | |
# Java | |
# ------------------------- | |
- name: Set up Maven | |
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 | |
with: | |
maven-version: ${{ env.MAVEN_VERSION }} | |
- name: Set up JDK | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b | |
with: | |
java-version-file: ${{ env.JAVA_VERSION_FILE }} | |
distribution: ${{ env.JAVA_DISTRO }} | |
cache: 'maven' | |
server-id: central # Value of the distributionManagement/repository/id field of the pom.xml | |
server-username: MAVEN_USERNAME # env variable for username in deploy | |
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy | |
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Value of the GPG private key to import | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase | |
# ------------------------- | |
# Maven Deploy | |
# ------------------------- | |
- name: Deploy Maven Artifacts | |
run: | | |
mvn -B -e -Prelease -Pdeployment -Pgpg deploy | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USER }} | |
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_TOKEN }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
deploy-website: | |
name: Website Deployment | |
runs-on: ubuntu-20.04 | |
permissions: | |
actions: read | |
contents: write | |
steps: | |
- name: Manage GH_TOKEN | |
if: env.GH_TOKEN == '' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
with: | |
token: ${{ env.GH_TOKEN }} | |
submodules: recursive | |
# ------------------------- | |
# Java | |
# ------------------------- | |
- name: Set up Maven | |
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 | |
with: | |
maven-version: ${{ env.MAVEN_VERSION }} | |
- name: Set up JDK | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b | |
with: | |
java-version-file: ${{ env.JAVA_VERSION_FILE }} | |
distribution: ${{ env.JAVA_DISTRO }} | |
cache: 'maven' | |
# ------------------------- | |
# Maven Site | |
# ------------------------- | |
- name: Build Website | |
run: | | |
mvn -B -e -Prelease package site site:stage | |
- name: Run deploy script | |
run: | | |
touch target/staging/.nojekyll | |
echo "oscal-cli.metaschema.dev" > target/staging/CNAME | |
bash .github/workflows/deploy.sh --push-only -v -m "Deploying website [ci skip]" |