Skip to content

Commit

Permalink
test: build as jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
grigoriev committed Aug 2, 2024
1 parent 9cdea30 commit 839fa20
Showing 1 changed file with 24 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
name: maven-release
name: build
on:
push:
branches: ['**/**']
jobs:
build:
prepare:
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -74,9 +74,27 @@ jobs:
- name: Extract artefact version
id: artefact_version
run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
maven-central:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
GITHUB_TOKEN: ${{ github.token }}
MARKDOWN2HTML_MAVEN_PLUGIN_FAIL_ON_ERROR: true
steps:
- name: Publish to Maven Central
if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') && github.ref == 'refs/heads/main' }}
run: mvn --batch-mode deploy -P gpg-sign -P nexus-staging
# if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') && github.ref == 'refs/heads/main' }}
run: mvn --batch-mode package # deploy -P gpg-sign -P nexus-staging
github-packages:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
GITHUB_TOKEN: ${{ github.token }}
MARKDOWN2HTML_MAVEN_PLUGIN_FAIL_ON_ERROR: true
steps:
- name: Publish to GitHub Packages
if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') && github.ref == 'refs/heads/main' }}
run: mvn --batch-mode deploy -P gpg-sign -P deploy-github-packages
# if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') && github.ref == 'refs/heads/main' }}
run: mvn --batch-mode package # deploy -P gpg-sign -P deploy-github-packages

0 comments on commit 839fa20

Please sign in to comment.