diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 998bb05..0ce20cb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 }} \ No newline at end of file