Issue #217: Do not sign SNAPSHOTs (we were not anyway due to activati… #7
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: Publish SNAPSHOT to TBD Artifactory | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version to publish. For example "1.0.0-SNAPSHOT". If not supplied, will default to version specified in the POM.' | |
required: false | |
default: '0.0.0-SNAPSHOT' | |
push: | |
branches: | |
- issue-217/maven-build | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
# https://cashapp.github.io/hermit/usage/ci/ | |
- name: Init Hermit | |
uses: cashapp/activate-hermit@v1 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
# This will publish to TBD Artifactory. Does not release to Maven Central. | |
# Skips testing as this workflow is triggered after CI where tests have already run | |
- name: Publish SNAPSHOT to TBD Artifactory | |
run: | | |
if [ -n "${{ github.event.inputs.version }}" ]; then | |
mvn \ | |
deploy \ | |
-DskipTests=true \ | |
--batch-mode \ | |
--settings .maven_settings.xml \ | |
-Dversion=${{ github.event.inputs.version }} | |
else | |
mvn \ | |
deploy \ | |
-DskipTests=true \ | |
--batch-mode \ | |
--settings .maven_settings.xml | |
fi | |
env: | |
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | |
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} |