build(deps): bump org.apache.maven.plugins:maven-release-plugin from … #319
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: Stage | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
stage: | |
runs-on: ubuntu-latest | |
environment: staging | |
name: Deploy and release snapshot | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Setup Java 19 | |
uses: actions/setup-java@v4.2.1 | |
with: | |
distribution: temurin | |
java-version: 19 | |
cache: maven | |
server-id: ossrh | |
server-username: OSSRH_USERNAME | |
server-password: OSSRH_TOKEN | |
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
gpg-passphrase: GPG_PASSPHRASE | |
- name: Setup Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Cache pip repository | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
- name: Prepare python environment | |
run: pip install -r requirements.txt | |
- name: Build site | |
run: mkdocs build | |
- name: Get current project version | |
id: currentVersion | |
uses: QwerMike/xpath-action@v1 | |
with: | |
filename: pom.xml | |
expression: '/*[local-name()="project"]/*[local-name()="version"]/text()' | |
- name: Deploy snapshot to OSSRH | |
if: endsWith(steps.currentVersion.outputs.result, '-SNAPSHOT') | |
env: | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
run: mvn deploy -Pprepare-deployment,sign-deployment,deploy-ossrh -B -ff |