Skip to content

Commit

Permalink
ci: update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
RTAkland committed Nov 30, 2024
1 parent 919f3d2 commit 937c80b
Showing 1 changed file with 11 additions and 31 deletions.
42 changes: 11 additions & 31 deletions .github/workflows/main.yml
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 }}

0 comments on commit 937c80b

Please sign in to comment.