Release #50
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
name: Release | |
env: | |
MAVEN_ARGS: -B -e | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: [closed] | |
paths: | |
- '.github/project.yml' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
name: release | |
steps: | |
- uses: actions/checkout@v2 | |
name: Checkout | |
- uses: radcortez/project-metadata-action@main | |
name: Retrieve project metadata | |
id: metadata | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
metadata-file-path: '.github/project.yml' | |
local-file: true | |
- name: Setup Java | |
uses: actions/setup-java@v2 | |
with: | |
java-version: 8 | |
distribution: 'temurin' | |
server-id: oss-sonatype-staging | |
server-username: OSS_SONATYPE_USERNAME | |
server-password: OSS_SONATYPE_PASSWORD | |
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
- name: Configure Git author | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
- name: Maven release ${{steps.metadata.outputs.current-version}} | |
run: | | |
./release.sh --release-version ${{steps.metadata.outputs.current-version}} | |
git push origin ${{github.base_ref}} | |
git push origin --tags | |
env: | |
OSS_SONATYPE_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }} | |
OSS_SONATYPE_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | |
- name: Push changes to ${{github.base_ref}} | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{github.base_ref}} | |
force: true |