Skip to content

Issue #217: Do not sign SNAPSHOTs (we were not anyway due to activati… #7

Issue #217: Do not sign SNAPSHOTs (we were not anyway due to activati…

Issue #217: Do not sign SNAPSHOTs (we were not anyway due to activati… #7

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 }}