Skip to content

[maven-release-plugin] prepare release v0.12.1 #13

[maven-release-plugin] prepare release v0.12.1

[maven-release-plugin] prepare release v0.12.1 #13

Workflow file for this run

on:
push:
tags:
- "v*"
workflow_dispatch:
name: Deploy Tagged Release
jobs:
deploy-to-nexus:
name: Build and Publish Java Artifacts
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
token: ${{ github.token }}
submodules: recursive
fetch-depth: 0
# -------------------------
# Java
# -------------------------
- name: Set up Maven
uses: stCarolas/setup-maven@07fbbe97d97ef44336b7382563d66743297e442f
with:
maven-version: 3.9.3
- name: Set up JDK 11
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2
with:
java-version: 11
distribution: 'temurin'
cache: 'maven'
server-id: ossrh # 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 -Pgpg -Prelease -Preporting deploy
# mvn -Pgpg -Prelease nexus-staging:close -DstagingDescription="closing to release"
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Create release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.COMMIT_TOKEN }}
draft: true
generate_release_notes: true
fail_on_unmatched_files: true
files: |
metaschema-cli/target/metaschema-cli-*-metaschema-cli.*
# -------------------------
# Maven Site
# -------------------------
- name: Build Website
run: |
mvn -B -e -Prelease -Preporting install site site:stage
- name: Run Website Deploy Script
run: |
touch target/staging/.nojekyll
bash .github/workflows/deploy.sh --push-only -v -m "Deploying website [ci skip]"