Minor bugs with InlineApprovals + changes to StringUtils.split #96
Workflow file for this run
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: Publish to Maven Central | |
on: | |
release: | |
types: [created] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Install Java and Maven | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Determine version from git tag | |
id: version | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | |
- name: disable formatting | |
run: ./set_formatting_off.sh | |
- name: set version | |
run: mvn versions:set -DnewVersion=${{ steps.version.outputs.tag }} | |
- name: Release Maven package | |
uses: samuelmeuli/action-maven-publish@v1 | |
with: | |
gpg_private_key: ${{ secrets.gpg_private_key }} | |
gpg_passphrase: ${{ secrets.gpg_passphrase }} | |
nexus_username: ${{ secrets.nexus_user_name }} | |
nexus_password: ${{ secrets.nexus_password }} | |
maven_profiles: release | |
- name: set snapshot version | |
run: mvn versions:set -DnewVersion=100.0.0-SNAPSHOT | |
- name: re-enable formatting | |
run: ./set_formatting_on.sh | |
- name: Install Java for script | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Run documentation update | |
run: java build/UpdateVersion.java ${{ steps.version.outputs.tag }} | |
- name: Push changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git commit -m "v ${{ steps.version.outputs.tag }}" -a || echo "nothing to commit" | |
git checkout -b temp | |
git fetch | |
git checkout master | |
git merge temp | |
remote="https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git" | |
git push "${remote}" master || echo "nothing to push" | |
shell: bash | |