Skip to content

Commit

Permalink
回滚 CI 流水线更改
Browse files Browse the repository at this point in the history
Revert "更新actions/checkout至v4"

This reverts commit 53a2694.

Revert "CI更改artifact名称并不再使用matrix"

This reverts commit be8dab9.

Revert "CI自动发布native image二进制文件"

This reverts commit 0292e57.
  • Loading branch information
Ghost-chu committed Apr 15, 2024
1 parent 5d26e5b commit 743a903
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 44 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/jvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- uses: graalvm/setup-graalvm@v1
name: Setup GraalVM
with:
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: Linux-${{ github.sha }}
name: build-artifacts ${{ matrix.version }} on ${{ matrix.os }}
path: |
target/*.jar
target/peerbanhelper-binary
Expand Down
59 changes: 17 additions & 42 deletions .github/workflows/native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@ on:
- published
jobs:
build-unix-like:
name: build unix like
runs-on: ubuntu-latest
name: ${{ matrix.version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
version: [ latest ]
os: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2
- uses: graalvm/setup-graalvm@v1
with:
java-version: '22'
Expand All @@ -34,7 +38,7 @@ jobs:
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: Linux-${{ github.sha }}
name: build-artifacts ${{ matrix.version }} on ${{ matrix.os }}
path: |
target/PeerBanHelper.jar
target/peerbanhelper-binary
Expand Down Expand Up @@ -65,10 +69,14 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}-native-linux
build-windows:
name: build windows
runs-on: windows-latest
name: ${{ matrix.version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
version: [ latest ]
os: [ windows-latest ]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2
- uses: graalvm/setup-graalvm@v1
with:
java-version: '22'
Expand All @@ -83,40 +91,7 @@ jobs:
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: Windows-${{ github.sha }}
name: build-artifacts ${{ matrix.version }} on ${{ matrix.os }}
path: |
target/PeerBanHelper.jar
target/peerbanhelper-binary.exe
release:
name: Release
runs-on: ubuntu-latest
needs: [build-unix-like,build-windows]
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Zip
working-directory: ./artifacts
run: |
for dir in ./*; do
if [ -d $dir ]; then
os="$(echo ${dir##*/} |cut -d- -f1)"
zip -rj "PeerBanHelper.${{ github.event.release.tag_name }}.$os.zip" $dir/*
rm -rf $dir
fi
done
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "artifacts/*.zip"
name: ${{ github.event.release.tag_name }}
omitNameDuringUpdate: true
tag: ${{ github.event.release.tag_name }}
allowUpdates: true
artifactErrorsFailBuild: true
target/peerbanhelper-binary.exe

0 comments on commit 743a903

Please sign in to comment.