diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0ce20cb..07debf3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,8 +24,4 @@ jobs: - name: Make Gradle wrapper executable run: chmod +x ./gradlew - name: Build - run: ./gradlew build - - name: Publish to Gitlab - run: ./gradlew publish - env: - GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} \ No newline at end of file + run: ./gradlew build \ No newline at end of file diff --git a/.github/workflows/release_package.yml b/.github/workflows/release_package.yml new file mode 100644 index 0000000..70a5b3f --- /dev/null +++ b/.github/workflows/release_package.yml @@ -0,0 +1,34 @@ +name: Publish Maven Package + +on: + push: + tags: + - 'v*' +jobs: + build: + strategy: + matrix: + java: + - 11 + os: + - ubuntu-latest + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository + 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 + run: chmod +x ./gradlew + - name: Build + run: ./gradlew build + - name: Publish + run: ./gradlew publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index c6eeb07..2289a06 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -47,10 +47,11 @@ subprojects { repositories { maven { - url = uri("https://repo.rtast.cn/api/v4/projects/33/packages/maven") + name = "GitHubPackages" + url = uri("https://maven.pkg.github.com/RTAkland/ROneBot") credentials { username = "RTAkland" - password = System.getenv("GITLAB_TOKEN") + password = System.getenv("GITHUB_TOKEN") } } }