Try to fix the collected messages text #14
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: Nightly Build and Publish | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | |
settings-path: ${{ github.workspace }} # location for the settings.xml file | |
- name: Build with Gradle | |
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 | |
with: | |
arguments: build | |
env: | |
GITHUB_USERNAME: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BUILD_NUMBER: ${{ github.run_number }} | |
- name: Retrieve all commit messages pushed and put in the environment variable GITHUB_COMMITS_TEXT | |
run: | | |
echo "GITHUB_COMMITS_TEXT=$(git log --format=%s ${{ github.sha }}..${{ github.event.before }})" >> $GITHUB_ENV | |
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in | |
# the publishing section of your build.gradle | |
- name: Publish to GitHub Packages | |
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 | |
with: | |
arguments: publishAllPublicationsToGitHubPackagesRepository | |
env: | |
GITHUB_USERNAME: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BUILD_NUMBER: ${{ github.run_number }} | |
- name: Delete packages, keep most recent | |
uses: actions/delete-package-versions@v4 | |
with: | |
package-name: 'org.minefortress.minefortress-nightly' | |
package-type: 'maven' | |
min-versions-to-keep: 10 | |
cleanup-old-packages: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Delete packages, keep most recent | |
uses: actions/delete-package-versions@v4 | |
with: | |
package-name: 'org.minefortress.minefortress-nightly' | |
package-type: 'maven' | |
min-versions-to-keep: 10 | |