Skip to content

Commit

Permalink
add publising to lavalink repo
Browse files Browse the repository at this point in the history
  • Loading branch information
duncte123 committed Jan 4, 2024
1 parent ec58ea7 commit ebbd19c
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Publish
on:
push:
release:
types: [ published ]
jobs:
build:
runs-on: ubuntu-latest
env:
LAVALINK_MAVEN_USERNAME: ${{ secrets.LAVALINK_MAVEN_USERNAME }}
LAVALINK_MAVEN_PASSWORD: ${{ secrets.LAVALINK_MAVEN_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
cache: gradle

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Build and Publish
run: ./gradlew build publish --no-daemon

- name: Upload main Artifact
uses: actions/upload-artifact@v3
with:
name: java-lyrics-plugin.jar
path: build/libs/lyrics-*.jar

- name: Upload plugin Artifact
uses: actions/upload-artifact@v3
with:
name: java-lyrics-lavalyrics.jar
path: lavalyrics/build/libs/lavalyrics-*.jar

release:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Download main Artifact
uses: actions/download-artifact@v3
with:
name: java-lyrics-plugin.jar

- name: Download plugin Artifact
uses: actions/download-artifact@v3
with:
name: java-lyrics-lavalyrics.jar

- name: Upload Artifacts to GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: java-lyrics-*.jar
allowUpdates: true
omitBodyDuringUpdate: true
omitDraftDuringUpdate: true
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: true

0 comments on commit ebbd19c

Please sign in to comment.