Skip to content

Release

Release #29

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
env:
GH_USER_NAME: github.actor
RELEASE_VERSION: ${{ github.event.inputs.version }}
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- name: Update version
run: mvn versions:set -DnewVersion=${{env.RELEASE_VERSION}} -DgenerateBackupPoms=false
- name: Set up GPG
run: |
echo "$GPG_PRIVATE_KEY" > private.asc
gpg --import --batch private.asc
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Release with Maven
run: |
mvn -B -Pdeploy -Dgpg.passphrase=${GPG_PASSPHRASE} -DcreateChecksum=true clean deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Create Release
id: createRelease
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{env.RELEASE_VERSION}}
release_name: Release ${{env.RELEASE_VERSION}}
draft: false
prerelease: false