Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
btwonion committed Jul 28, 2024
1 parent e08362d commit eb1cfdf
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 30 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/build-commit.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Used when a commit is pushed to the repository
# This makes use of caching for faster builds and uploads the resulting artifacts
name: build-commit

on:
Expand All @@ -16,7 +14,6 @@ on:
- "README.md"
- "LICENSE"
- ".gitignore"
- "changelog.md"
- ".editorconfig"
- "src/*/resources/lang/*"
workflow_dispatch:
Expand All @@ -38,17 +35,9 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
run: ./gradlew buildAllVersions --stacktrace
- uses: actions/upload-artifact@v4
uses: Wandalen/wretry.action@master
with:
path: versions/**/build/libs/*.jar

modrinth-description:
runs-on: ubuntu-latest
name: Sync Modrinth description
steps:
- uses: actions/checkout@v4
- uses: funnyboy-roks/[email protected]
command: ./gradlew buildAllVersions --stacktrace
- uses: actions/upload-artifact@v4
with:
auth-token: ${{ secrets.MODRINTH_API_KEY }}
slug: 'better-boat-movement'
path: versions/**/build/libs/*.jar
20 changes: 20 additions & 0 deletions .github/workflows/readme-modrinth-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: sync-readme

on:
push:
paths:
- "README.md"
branches:
- main
workflow_dispatch:

jobs:
modrinth-description:
runs-on: ubuntu-latest
name: Sync Modrinth description
steps:
- uses: actions/checkout@v4
- uses: funnyboy-roks/[email protected]
with:
auth-token: ${{ secrets.MODRINTH_API_KEY }}
slug: 'better-boat-movement'
20 changes: 6 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,16 @@ jobs:
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
uses: Wandalen/wretry.action@master
with:
command: ./gradlew buildAllVersions --stacktrace
- name: Release with Gradle
run: ./gradlew releaseAllVersions postUpdate --stacktrace
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MODRINTH_API_KEY: ${{ secrets.MODRINTH_API_KEY }}
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_ROLE_ID: ${{ secrets.DISCORD_ROLE_ID }}
NYON_USERNAME: ${{ secrets.NYON_USERNAME }}
NYON_PASSWORD: ${{ secrets.NYON_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_SECRET_KEY_PASSWORD }}
GPG_SECRET_KEY_ID: ${{ secrets.GPG_SECRET_KEY_ID }}

modrinth-description:
runs-on: ubuntu-latest
name: Sync Modrinth description
steps:
- uses: actions/checkout@v4
- uses: funnyboy-roks/[email protected]
with:
auth-token: ${{ secrets.MODRINTH_API_KEY }}
slug: 'better-boat-movement'
NYON_PASSWORD: ${{ secrets.NYON_PASSWORD }}
2 changes: 1 addition & 1 deletion stonecutter.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ tasks.register("postUpdate") {
title = "v$featureVersion of ${rootProject.name} released!",
description = "# Changelog\n$changelogText",
timestamp = Instant.now().toString(),
color = 0x4ab616,
color = 0x683912,
fields = listOf(
Field(
"Supported versions", stonecutter.versions.joinToString { it.version }, false
Expand Down

0 comments on commit eb1cfdf

Please sign in to comment.