Skip to content

Update maven-publishing.yml #2

Update maven-publishing.yml

Update maven-publishing.yml #2

name: Publish project to Maven repository
on:
workflow_call:
inputs:
TAG_NAME:
required: true
type: string
secrets:
MAVEN_CENTRAL_USERNAME:
required: true
MAVEN_CENTRAL_PASSWORD:
required: true
MAVEN_USERNAME:
required: true
MAVEN_PASSWORD:
required: true
PLUGIN_SECRET_KEY:
required: true
GPG_SECRET_KEY_ID:
required: true
GPG_PASSPHRASE:
required: true
jobs:
check-tag:
runs-on: ubuntu-latest
outputs:
MAVEN_CENTRAL: ${{ steps.check_tag.outputs.MAVEN_CENTRAL }}
MAVEN_PUZZLE: ${{ steps.check_tag.outputs.MAVEN_PUZZLE }}
steps:
- name: Check tag suffixes
id: check_tag
run: |
echo "TAG=${{ inputs.TAG_NAME }}" >> $GITHUB_OUTPUT
if [[ "${{ inputs.TAG_NAME }}" == *"+c"* ]]; then
echo "MAVEN_CENTRAL=true" >> $GITHUB_OUTPUT
else
echo "MAVEN_CENTRAL=false" >> $GITHUB_OUTPUT
fi
if [[ "${{ inputs.TAG_NAME }}" == *"+m"* ]]; then
echo "MAVEN_PUZZLE=true" >> $GITHUB_OUTPUT
else
echo "MAVEN_PUZZLE=false" >> $GITHUB_OUTPUT
fi
maven-central-publish:
needs: check-tag
if: needs.check-tag.outputs.MAVEN_CENTRAL == 'true'
uses: PuzzlesHQ/.github/workflows/maven-central-publishing.yml@main

Check failure on line 52 in .github/workflows/maven-publishing.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/maven-publishing.yml

Invalid workflow file

invalid value workflow reference: references to workflows must be prefixed with format 'owner/repository/' or './' for local workflows
secrets: inherit
maven-puzzle-publish:
needs: check-tag
if: needs.check-tag.outputs.MAVEN_PUZZLE == 'true'
uses: PuzzlesHQ/.github/workflows/maven-puzzle-publishing.yml@main
secrets: inherit