-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #478 from PBH-BTN/master
v6.2.2
- Loading branch information
Showing
117 changed files
with
2,808 additions
and
1,220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: DEB Package Build | ||
|
||
on: | ||
workflow_call: | ||
jobs: | ||
dpkg: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- id: java_info | ||
uses: YunaBraska/java-info-action@main | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: maven-dist | ||
path: target/ | ||
- name: Build Deb package | ||
id: build-deb | ||
run: | | ||
calculatedSha=$(git rev-parse --short ${{ github.sha }}) | ||
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV | ||
sed -i "s/<version>/${{ env.PBH_VERSION }}/g" pkg/deb/DEBIAN/control | ||
cp target/PeerBanHelper.jar pkg/deb/usr/lib/peerbanhelper | ||
cd pkg && dpkg -b deb PeerBanHelper_linux_${{ env.PBH_VERSION }}.deb | ||
# 上面那个文件名需要符合收集条件 | ||
env: | ||
PBH_VERSION: ${{ steps.java_info.outputs.project_version }} | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: deb-dist | ||
path: | | ||
pkg/*.deb | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: build WebUI | ||
name: WebUI CI | ||
|
||
on: workflow_call | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Installer Build | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
INSTALL4J_LICENSE: | ||
required: true | ||
jobs: | ||
install4jc: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- id: java_info | ||
uses: YunaBraska/java-info-action@main | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: maven-dist | ||
path: target/ | ||
- uses: luangong/setup-install4j@v1 | ||
name: Setup Install4j | ||
with: | ||
version: 10.0.8 | ||
license: ${{ secrets.INSTALL4J_LICENSE }} | ||
- name: Make installers | ||
run: | | ||
ls /opt/install4j/ | ||
/opt/install4j/bin/install4jc -L ${{ secrets.INSTALL4J_LICENSE }} -r ${{ steps.java_info.outputs.project_version }} -d target/media -D jarPath=target/PeerBanHelper.jar install4j/project.install4j | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: installer-dist | ||
path: | | ||
target/media/PeerBanHelper_* | ||
id: project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Maven Build | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
INSTALL4J_LICENSE: | ||
required: true | ||
jobs: | ||
WebUI: | ||
uses: ./.github/workflows/build_fe.yml | ||
Maven: | ||
needs: WebUI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: webui-dist | ||
path: src/main/resources/static | ||
- name: Display structure of WebUI dist | ||
run: ls src/main/resources/static | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: "21" | ||
cache: 'maven' | ||
cache-dependency-path: '**/pom.xml' | ||
- name: Build with Maven | ||
run: mvn -B clean package --file pom.xml -P thin-sqlite-packaging | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: maven-dist | ||
path: | | ||
target/*.jar | ||
target/media/*.exe | ||
id: project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: SPK Package Build | ||
|
||
on: | ||
workflow_call: | ||
jobs: | ||
pkgcreate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- id: java_info | ||
uses: YunaBraska/java-info-action@main | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: maven-dist | ||
path: target/ | ||
- name: Set short git commit SHA | ||
id: vars | ||
run: | | ||
calculatedSha=$(git rev-parse --short ${{ github.sha }}) | ||
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV | ||
- name: Run build script | ||
run: sudo PBH_VERSION=${{ env.PBH_VERSION }} IMAGE=${{ env.IMAGE }} bash pkg/synopkg/build-script.sh | ||
env: | ||
PBH_VERSION: ${{ steps.java_info.outputs.project_version }} | ||
IMAGE: ghostchu/peerbanhelper-snapshot:sha-${{ env.COMMIT_SHORT_SHA }} | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: spk-dist | ||
path: | | ||
/toolkit/build_env/ds.apollolake-7.2/image/packages/*.spk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# 注意!! | ||
# 此 PR 禁止使用包含敏感数据或者发布型的操作,避免恶意用户通过 PR 对供应链发起攻击 | ||
|
||
name: Java CI | ||
name: Java CI (pull_request) | ||
|
||
on: | ||
pull_request: | ||
|
@@ -19,8 +19,6 @@ jobs: | |
with: | ||
name: webui-dist | ||
path: src/main/resources/static | ||
- name: Display structure of WebUI dist | ||
run: ls src/main/resources/static | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
|
@@ -32,39 +30,7 @@ jobs: | |
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: PullRequest-Artifact-${{ github.sha }} | ||
name: maven-dist | ||
path: | | ||
target/*.jar | ||
target/peerbanhelper-binary | ||
target/media/*.exe | ||
- name: Set Up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set Up Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: ghostchu/peerbanhelper-snapshot | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=tag | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=raw,ci-jvm-universal | ||
type=raw,ci | ||
type=sha | ||
- name: Build and push Docker image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
file: ./Dockerfile-CI | ||
push: false | ||
platforms: | | ||
linux/amd64 | ||
linux/arm64/v8 | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }}-jvm-universal | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
target/media/*.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,80 +6,67 @@ | |
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Java CI | ||
name: Java CI (push) | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
jobs: | ||
WebUI: | ||
uses: ./.github/workflows/build_fe.yml | ||
CI: | ||
needs: WebUI | ||
uses: ./.github/workflows/build_maven.yml | ||
secrets: inherit | ||
Build_Installers: | ||
needs: CI | ||
uses: ./.github/workflows/build_installers.yml | ||
secrets: inherit | ||
Build_SPK: | ||
needs: CI | ||
uses: ./.github/workflows/build_spk.yml | ||
Build_DEB: | ||
needs: CI | ||
uses: ./.github/workflows/build_deb.yml | ||
Build_Docker: | ||
needs: CI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: webui-dist | ||
path: src/main/resources/static | ||
- name: Display structure of WebUI dist | ||
run: ls src/main/resources/static | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: "21" | ||
cache: 'maven' | ||
cache-dependency-path: '**/pom.xml' | ||
- uses: luangong/setup-install4j@v1 | ||
name: Setup Install4j | ||
with: | ||
version: 10.0.8 | ||
license: ${{ secrets.INSTALL4J_LICENSE }} | ||
- name: Build with Maven | ||
run: mvn -B clean package --file pom.xml -P install4j-ci,thin-sqlite-packaging | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Artifact-${{ github.sha }} | ||
path: | | ||
target/*.jar | ||
target/peerbanhelper-binary | ||
target/media/*.exe | ||
id: project | ||
- name: Set Up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set Up Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: ghostchu/peerbanhelper-snapshot | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=tag | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=raw,ci-jvm-universal | ||
type=raw,ci | ||
type=sha | ||
- name: Build and push Docker image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
file: ./Dockerfile-CI | ||
push: true | ||
platforms: | | ||
linux/amd64 | ||
linux/arm64/v8 | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }}-jvm-universal | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: maven-dist | ||
path: target | ||
- name: Set Up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set Up Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: ghostchu/peerbanhelper-snapshot | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=tag | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=raw,ci-jvm-universal | ||
type=raw,ci | ||
type=sha | ||
- name: Build and push Docker image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
file: ./Dockerfile-CI | ||
push: true | ||
platforms: | | ||
linux/amd64 | ||
linux/arm64/v8 | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }}-jvm-universal | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
Oops, something went wrong.