Skip to content

Commit

Permalink
Fix release
Browse files Browse the repository at this point in the history
  • Loading branch information
Patbox committed Sep 19, 2023
1 parent 238976c commit 0357c55
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ jobs:
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Build and publish with Gradle
run: ./gradlew build publish
env:
MODRINTH: ${{ secrets.MODRINTH }}
CHANGELOG: ${{ github.event.release.body }}
run: ./gradlew build
- name: capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS
uses: actions/upload-artifact@v2
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release

on:
release:
types:
- published
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/cache@v2
with:
path: |
~/.gradle/loom-cache
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 17

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build and publish with Gradle
run: ./gradlew build publish
env:
MAVEN_URL: ${{ secrets.MAVEN_URL }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
CURSEFORGE: ${{ secrets.CURSEFORGE }}
MODRINTH: ${{ secrets.MODRINTH }}
CHANGELOG: ${{ github.event.release.body }}
- name: Upload GitHub release
uses: AButler/upload-release-assets@v2.0
with:
files: 'build/libs/*.jar;!build/libs/*-sources.jar;!build/libs/*-dev.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'fabric-loom' version '0.11-SNAPSHOT'
id 'maven-publish'
id "com.modrinth.minotaur" version "2.+"
}

sourceCompatibility = JavaVersion.VERSION_17
Expand Down

0 comments on commit 0357c55

Please sign in to comment.