allow updating source settings via rest #345
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
release: | |
types: [ published ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
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 -PMAVEN_USERNAME=$MAVEN_USERNAME -PMAVEN_PASSWORD=$MAVEN_PASSWORD -PLAVALINK_MAVEN_USERNAME=$LAVALINK_MAVEN_USERNAME -PLAVALINK_MAVEN_PASSWORD=$LAVALINK_MAVEN_PASSWORD | |
- name: Upload main Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: LavaSrc.jar | |
path: main/build/libs/lavasrc-*.jar | |
- name: Upload plugin Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: LavaSrc-Plugin.jar | |
path: plugin/build/libs/lavasrc-plugin-*.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: LavaSrc.jar | |
- name: Download plugin Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: LavaSrc-Plugin.jar | |
- name: Upload Artifacts to GitHub Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: lavasrc-*.jar | |
allowUpdates: true | |
omitBodyDuringUpdate: true | |
omitDraftDuringUpdate: true | |
omitNameDuringUpdate: true | |
omitPrereleaseDuringUpdate: true |