Skip to content

Code cleanup

Code cleanup #109

Workflow file for this run

name: Dev Build
on:
push:
branches: [ dev ]
paths: [ src/** ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Checkout repo
with:
token: ${{ secrets.ACTIONS_PAT }}
- name: Configure git
run: |
git config user.name "Build Monkey"
git config user.email "<>"
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: 'Create settings.xml'
uses: s4u/maven-settings-action@v2.8.0
with:
githubServer: false
servers: '[{"id": "ossrh", "username": "Travja", "password": "${{ secrets.SONATYPE_DEPLOY_KEY }}"}]'
- name: Publish to Maven Central
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
mvn clean deploy -P gpg,publish -DcreateChecksum=true 2>&1 | tee log.txt
result_code=${PIPESTATUS[0]}
exit $result_code
- name: Tag release version
run: |
version=$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout)
git tag -a $version -m "Dev $version"
- name: Update version
run: python ./.github/update_version.py true
- name: Push to git
run: |
git add .
git reset settings.xml log.txt toolchains.xml
git commit -m "[ci skip] Update dev version"
git push
git push --tags
- name: Notify Discord
run: pip install simplejson && python ./.github/notify_published.py ${{ secrets.WEBHOOK_URL }} true