-
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.
- Loading branch information
Showing
1 changed file
with
11 additions
and
31 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 |
---|---|---|
@@ -1,51 +1,31 @@ | ||
name: Build Kwsify | ||
name: Build ROneBot | ||
on: | ||
- push | ||
- pull_request | ||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
java: | ||
- 8 | ||
- 11 | ||
os: | ||
- ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Validate gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Setup jdk ${{ matrix.java }} | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
|
||
- name: Make Gradle wrapper executable | ||
if: ${{ runner.os != 'Windows' }} | ||
run: chmod +x ./gradlew | ||
|
||
- name: Build with shadowJar | ||
run: ./gradlew shadowJar | ||
|
||
- name: Create Git Tag | ||
id: create_tag | ||
run: version=$(cat build.gradle | grep "version =" | sed "s/version = '\(.*\)'/\1/" | tr -d "'") && git tag $version && echo "tag=$version" >> $GITHUB_OUTPUT | ||
|
||
|
||
- name: Rename artifact file | ||
id: rename_artifact_file | ||
run: mv ./build/libs/*-all.jar ./kwsify-${{ steps.create_tag.outputs.tag }}.jar | ||
|
||
- name: Upload jar to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.REPO_TOKEN }} | ||
file: ./kwsify-${{ steps.create_tag.outputs.tag }}.jar | ||
tag: ${{ steps.create_tag.outputs.tag }} | ||
release_name: ${{ steps.create_tag.outputs.tag }}-Release | ||
overwrite: true | ||
file_glob: true | ||
body: "Release for tag: ${{ steps.create_tag.outputs.tag }}" | ||
- name: Build | ||
run: ./gradlew build | ||
- name: Publish to Gitlab | ||
run: ./gradlew publish | ||
env: | ||
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} |