Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release merge #703

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading