Skip to content

Commit

Permalink
ci(dev): 自动打包
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlimiter committed Feb 2, 2024
1 parent 93ce175 commit 1f21b51
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 46 deletions.
46 changes: 0 additions & 46 deletions .github/workflows/gradle.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
show-progress: false

- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'adopt'

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Make Gradle Wrapper Executable
run: chmod +x ./gradlew

- name: Build project
run: |
gradle wrapper
bash gradlew shadowJar
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/libs/*
body: Please refer to [CHANGELOG.md](https://github.com/cnlimiter/onebot-client/blob/master/CHANGELOG.md) for details.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ shadowJar {
project.configurations.shadow.setTransitive(false);
configurations = [project.configurations.shadow]
relocate 'org.java_websocket', "cn.evole.onebot.sdk.websocket"
relocate 'net.kyori.event', "cn.evole.onebot.eventbus"
dependencies {
exclude(dependency('org.slf4j:slf4j-api:2.0.6'))
}
Expand Down

0 comments on commit 1f21b51

Please sign in to comment.