Skip to content

Commit

Permalink
Create gradle-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
CoasterFreakDE authored Sep 3, 2024
1 parent f36408b commit 3004bd9
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release Build

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin' # Optional, defaults to 'temurin'
java-version: '21'

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

- name: Build with Gradle
run: ./gradlew build

- name: Upload JAR to Release
uses: actions/upload-artifact@v3
with:
name: shaderapi-plugin
path: build/libs/*.jar

- name: Attach JAR to GitHub Release
uses: softprops/action-gh-release@v1
with:
files: build/libs/*.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 3004bd9

Please sign in to comment.