Skip to content

Commit

Permalink
[#noissue] Add git-ref for deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
emeroad committed Dec 27, 2021
1 parent eda32f7 commit 8318b5b
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/maven-central-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,33 @@
name: Publish package to the Maven Central Repository

on:
release:
types: [ created ]
workflow_dispatch:
inputs:
git-ref:
description: 'The branch, tag or SHA to checkout'
required: true
default: 'master'

jobs:
publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: |
echo "Release branch: ${{ github.event.inputs.git-ref }}!"
- name : Git checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.git-ref }}
- name: Set up JDK 7
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '7'
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '8'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
Expand Down

0 comments on commit 8318b5b

Please sign in to comment.