From 76504df8ac9455e51177d8bdbf5effc088c778f6 Mon Sep 17 00:00:00 2001 From: btwonion Date: Thu, 1 Aug 2024 16:50:31 +0200 Subject: [PATCH] update workflows --- .github/workflows/build-commit.yml | 18 ++++-------------- .github/workflows/readme-modrinth-sync.yml | 20 ++++++++++++++++++++ .github/workflows/release.yml | 16 +++++----------- 3 files changed, 29 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/readme-modrinth-sync.yml diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index d6b6e01..0b31978 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -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: @@ -38,17 +36,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/modrinth-auto-desc@v1.6 + command: ./gradlew buildAllVersions --stacktrace + - uses: actions/upload-artifact@v4 with: - auth-token: ${{ secrets.MODRINTH_API_KEY }} - slug: 'telekinesis' \ No newline at end of file + path: versions/**/build/libs/*.jar \ No newline at end of file diff --git a/.github/workflows/readme-modrinth-sync.yml b/.github/workflows/readme-modrinth-sync.yml new file mode 100644 index 0000000..fa7234a --- /dev/null +++ b/.github/workflows/readme-modrinth-sync.yml @@ -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/modrinth-auto-desc@v1.6 + with: + auth-token: ${{ secrets.MODRINTH_API_KEY }} + slug: 'telekinesis' \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c06d56e..68ecbd4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,6 +20,10 @@ 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: @@ -28,14 +32,4 @@ jobs: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} DISCORD_ROLE_ID: ${{ secrets.DISCORD_ROLE_ID }} NYON_USERNAME: ${{ secrets.NYON_USERNAME }} - NYON_PASSWORD: ${{ secrets.NYON_PASSWORD }} - - modrinth-description: - runs-on: ubuntu-latest - name: Sync Modrinth description - steps: - - uses: actions/checkout@v4 - - uses: funnyboy-roks/modrinth-auto-desc@v1.6 - with: - auth-token: ${{ secrets.MODRINTH_API_KEY }} - slug: 'telekinesis' \ No newline at end of file + NYON_PASSWORD: ${{ secrets.NYON_PASSWORD }} \ No newline at end of file