Skip to content

Commit

Permalink
chore: migrate to github packages
Browse files Browse the repository at this point in the history
  • Loading branch information
RTAkland committed Dec 16, 2024
1 parent eed031a commit 1eb521b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 7 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
run: ./gradlew build
34 changes: 34 additions & 0 deletions .github/workflows/release_package.yml
Original file line number Diff line number Diff line change
@@ -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 }}
5 changes: 3 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
}
Expand Down

0 comments on commit 1eb521b

Please sign in to comment.