Skip to content

change workflow files to build on PR:s and only create new release on… #1

change workflow files to build on PR:s and only create new release on…

change workflow files to build on PR:s and only create new release on… #1

name: Merge to Master
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 1.8
uses: actions/setup-java@v4.2.1
with:
java-version: 8.0.412+8
distribution: 'adopt'
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- uses: s4u/maven-settings-action@v3.0.0
with:
servers: |
[{
"id": "central",
"username": "${{ secrets.OSSRH_USERNAME }}",
"password": "${{ secrets.OSSRH_TOKEN }}"
}]
- name: Bump version and push tag
id: version
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_branches: master
create_annotated_tag: false
tag_prefix: ''
default_bump: false
- name: Bump version in pom.xml
run: mvn versions:set -DnewVersion=${{ steps.version.outputs.new_tag }}
- name: Build with Maven
if: steps.version.outputs.new_tag != undefined

Check failure on line 44 in .github/workflows/merge-to-master.yaml

View workflow run for this annotation

GitHub Actions / Merge to Master

Invalid workflow file

The workflow is not valid. .github/workflows/merge-to-master.yaml (Line: 44, Col: 13): Unrecognized named-value: 'undefined'. Located at position 34 within expression: steps.version.outputs.new_tag != undefined .github/workflows/merge-to-master.yaml (Line: 47, Col: 13): Unrecognized named-value: 'undefined'. Located at position 34 within expression: steps.version.outputs.new_tag != undefined
run: mvn -B package --file pom.xml
- name: Publish to Maven Central
if: steps.version.outputs.new_tag != undefined
run: mvn deploy