fix: update workflow to trigger on master branch instead of main #1
Workflow file for this run
This file contains hidden or 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: CD-CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.event.pusher.email != 'version-bump@flossware.org' | |
| runs-on: ubuntu-latest | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| steps: | |
| - name: Updating runner | |
| run: sudo apt-get update | |
| - name: Setup JDK 11 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '11' | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup .gitconfig for version bumps | |
| uses: oleksiyrudenko/gha-git-credentials@latest | |
| with: | |
| global: true | |
| name: 'Version Bump' | |
| email: 'version-bump@flossware.org' | |
| actor: 'VersionBump' | |
| token: '${{ secrets.GITHUB_TOKEN }}' | |
| - name: Incrementing pom.xml version | |
| run: "mvn -U build-helper:parse-version versions:set -DnewVersion=\\${parsedVersion.majorVersion}.\\${parsedVersion.nextMinorVersion} versions:commit" | |
| - name: Ensure latest dependencies in pom.xml | |
| run: "mvn -Dincludes='org.junit.jupiter:*' -DgenerateBackupPoms=false versions:update-properties" | |
| - name: Building | |
| run: "mvn -U clean install" | |
| - name: Checkin and tag to github | |
| run: "mvn scm:checkin scm:tag" |