Skip to content

Commit

Permalink
Merge pull request #703 from P3pp3rF1y/1.20.x-dev
Browse files Browse the repository at this point in the history
Release merge
  • Loading branch information
P3pp3rF1y authored Oct 1, 2024
2 parents 642962e + 6d5f1cf commit 0083272
Show file tree
Hide file tree
Showing 8 changed files with 262 additions and 86 deletions.
39 changes: 28 additions & 11 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
java-version: 17
distribution: zulu
cache: gradle
- name: Build with Gradle
env:
USERNAME: ${{ secrets.USERNAME }}
READ_PACKAGES_TOKEN: ${{ secrets.READ_PACKAGES_TOKEN }}
uses: nick-invision/retry@v2
uses: nick-invision/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
Expand All @@ -29,10 +26,32 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew build publish
- name: Cleanup old artifacts
uses: actions/delete-package-versions@v3
uses: actions/delete-package-versions@v5
with:
package-name: 'reliquary.reliquary'
min-versions-to-keep: 10
- name: Publish to CurseForge
env:
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
run: |
BRANCH_NAME=${GITHUB_REF##*/}
if [[ "$BRANCH_NAME" =~ ^[0-9]+\.[0-9]+\.([0-9]+|x)$ ]]; then
./gradlew curseforge
else
echo "Branch name does not match the pattern: $BRANCH_NAME. Skipping CurseForge upload."
exit 0
fi
- name: Publish to Modrinth
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
run: |
BRANCH_NAME=${GITHUB_REF##*/}
if [[ "$BRANCH_NAME" =~ ^[0-9]+\.[0-9]+\.([0-9]+|x)$ ]]; then
./gradlew modrinth
else
echo "Branch name does not match the pattern: $BRANCH_NAME. Skipping Modrinth upload."
exit 0
fi
- name: Code Quality
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -43,7 +62,7 @@ jobs:
echo "VERSION_NAME=$(${{github.workspace}}/gradlew -q printVersionName | awk -F "version:" '{printf $2}')" >> $GITHUB_OUTPUT
id: version
- name : Compile version message
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const gh = ${{ toJSON(github) }};
Expand All @@ -64,11 +83,9 @@ jobs:
core.setOutput('EMBED_DESCRIPTION', description);
id: embed
- name: Send Discord Notification
uses: tsickert/discord-webhook@v5.3.0
uses: tsickert/discord-webhook@v6.0.0
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK }}
embeds: ${{steps.embed.outputs.EMBEDS}}
content: null
embed-title: "${{steps.embed.outputs.EMBED_TITLE}}"
embed-url: "${{steps.embed.outputs.EMBED_URL}}"
embed-description: "${{steps.embed.outputs.EMBED_DESCRIPTION}}"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
!build.gradle
!build.properties
!gradle.properties
!settings.gradle
!.github/

# include markdowns
Expand Down
Loading

0 comments on commit 0083272

Please sign in to comment.