forked from jagrosh/MusicBot
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
18 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,13 @@ jobs: | |
uses: actions/checkout@v4 | ||
with: | ||
ref: 'jda5' | ||
|
||
- name: Set short git commit SHA | ||
id: vars | ||
run: | | ||
calculatedSha=$(git rev-parse --short ${{ github.sha }}) | ||
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
|
@@ -30,13 +37,13 @@ jobs: | |
run: mvn --batch-mode --update-snapshots verify | ||
|
||
- name: Rename jar | ||
run: mv target/*-All.jar JMusicBot-${{ github.sha::7 }}.jar | ||
run: mv target/*-All.jar JMusicBot-${{ env.COMMIT_SHORT_SHA }}.jar | ||
|
||
- name: Upload jar | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: jar | ||
path: JMusicBot-${{ github.sha::7 }}.jar | ||
path: JMusicBot-${{ env.COMMIT_SHORT_SHA }}.jar | ||
if-no-files-found: error | ||
|
||
create_release: | ||
|
@@ -50,6 +57,12 @@ jobs: | |
ref: 'jda5' | ||
fetch-depth: '0' | ||
|
||
- name: Set short git commit SHA | ||
id: vars | ||
run: | | ||
calculatedSha=$(git rev-parse --short ${{ github.sha }}) | ||
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV | ||
- name: Download a Build Artifact | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -71,8 +84,8 @@ jobs: | |
uses: ncipollo/release-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.sha::7 }} | ||
name: Version ${{ github.sha::7 }} | ||
tag: ${{ env.COMMIT_SHORT_SHA }} | ||
name: Version ${{ env.COMMIT_SHORT_SHA }} | ||
draft: true | ||
prerelease: false | ||
artifacts: "*.jar" | ||
|
@@ -84,4 +97,4 @@ jobs: | |
### Setup | ||
https://jmusicbot.com/setup | ||
https://jmusicbot.com/config | ||
# Download: [JMusicBot-${{ github.sha::7 }}.jar](https://github.com/ErdbeerbaerLP/MusicBot/releases/download/${{ github.sha::7 }}/JMusicBot-${{ github.sha::7 }}.jar) | ||
# Download: [JMusicBot-${{ env.COMMIT_SHORT_SHA }}.jar](https://github.com/ErdbeerbaerLP/MusicBot/releases/download/${{ env.COMMIT_SHORT_SHA }}/JMusicBot-${{ env.COMMIT_SHORT_SHA }}.jar) |