[maven-release-plugin] prepare release 1.0.1 #10
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
# yamllint --format github .github/workflows/deploy.yml | |
--- | |
name: deploy | |
# We deploy on master and release versions, regardless of if the commit is | |
# documentation-only or not. | |
# | |
# See https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet | |
on: | |
push: | |
# Don't deploy tags as they conflict with [maven-release-plugin] prepare release MAJOR.MINOR.PATCH | |
tags: '' | |
branches: master | |
jobs: | |
deploy: | |
runs-on: ubuntu-20.04 # newest available distribution, aka focal | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 # only needed to get the sha label | |
- name: Cache local Maven repository | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-maven- | |
- name: Deploy | |
env: | |
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} | |
# GPG_PASSPHRASE=<passphrase for GPG_SIGNING_KEY> | |
# - referenced in .settings.xml | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
# SONATYPE_USER=<sonatype account token> | |
# - deploys snapshots and releases to Sonatype | |
# - needs access to io.zipkin via https://issues.sonatype.org/browse/OSSRH-16669 | |
# - generate via https://oss.sonatype.org/#profile;User%20Token | |
# - referenced in .settings.xml | |
SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | |
# SONATYPE_PASSWORD=<password to sonatype account token> | |
# - referenced in .settings.xml | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
run: | # GITHUB_REF will be refs/heads/master or refs/tags/MAJOR.MINOR.PATCH | |
build-bin/configure_deploy && | |
build-bin/deploy $(echo ${GITHUB_REF} | cut -d/ -f 3) |