v0.8.8 #23
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
name: Release | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: get version from tag | |
id: get_version | |
run: | | |
realversion="${GITHUB_REF/refs\/tags\//}" | |
realversion="${realversion//v/}" | |
echo "::set-output name=VERSION::$realversion" | |
- name: Set up publishing to maven central | |
uses: actions/setup-java@v2 | |
with: | |
java-version: 17 | |
distribution: 'zulu' | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
- name: mvn versions | |
run: mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }} | |
- name: Install gpg key | |
run: | | |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import | |
gpg --list-secret-keys --keyid-format LONG | |
- name: Publish | |
working-directory: redis-om-spring | |
run: | | |
mvn --no-transfer-progress \ | |
--batch-mode \ | |
-Dgpg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' \ | |
-DskipTests deploy -P release | |
env: | |
MAVEN_USERNAME: ${{secrets.OSSRH_USERNAME}} | |
MAVEN_PASSWORD: ${{secrets.OSSRH_TOKEN}} |