Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sualeh committed Feb 12, 2024
1 parent aa8f371 commit fb5371f
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
name: Create Release

on:
workflow_dispatch:
push:
branches-ignore:
- '*'
tags:
- v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+.[0-9]
- v[0-9]+.[0-9]+.[0-9]+-[0-9]
- v[0-9]+.[0-9]+.[0-9]+-[A-Z]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Create Release
Expand All @@ -24,7 +27,9 @@ jobs:
# BUILD FOR DISTRIBUTION
- id: build
name: Build and test for distribution
shell: bash
run: |
# Build
mvn \
--no-transfer-progress \
--batch-mode \
Expand All @@ -48,17 +53,24 @@ jobs:
# PUBLISH TO CENTRAL REPOSITORY
- id: install-secret-key
name: Install secret key
if: startsWith(github.ref, 'refs/tags/')
# Note: OSSRH_GPG_SECRET_KEY is exported using gpg --export-secret-keys -a <keyid>
# and has newlines substituted with a literal \n
shell: bash
run: |
# Install secret key
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- id: publish-to-central
name: Publish to Central Repository
if: startsWith(github.ref, 'refs/tags/')
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
shell: bash
run: |
# Publish to Central Repository
export GPG_TTY=$(tty)
mvn \
--no-transfer-progress \
--batch-mode \
Expand Down

0 comments on commit fb5371f

Please sign in to comment.