Skip to content

Commit

Permalink
chore: 优化release构建
Browse files Browse the repository at this point in the history
  • Loading branch information
bangbang93 committed Mar 28, 2024
1 parent 23fedf3 commit 4e92776
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,7 @@ on:
- "v*"

jobs:
create-release:
runs-on: "ubuntu-latest"
name: "Create Release"
steps:
- uses: actions/checkout@v4
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false

build-tar-ball:
needs: "create-release"
name: "Build and Tar Ball"
strategy:
fail-fast: false
Expand Down Expand Up @@ -53,13 +42,29 @@ jobs:
tar -caf ${{ matrix.artifact_name }} dist package.json node_modules node.exe run.ps1
if: matrix.os == 'windows-latest'
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
- name: "Upload Artifact"
uses: actions/upload-artifact@v4
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.artifact_name }}
tag: ${{ github.ref }}
name: ${{ matrix.artifact_name }}
path: ${{ matrix.artifact_name }}

create-release:
runs-on: "ubuntu-latest"
name: "Create Release"
needs: "build-tar-ball"
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
merge-multiple: true
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: ${{ contains(github.ref, '-') }}
files: |
openbmclapi-linux.tar.xz
openbmclapi-windows.tar.gz
openbmclapi-macos.tar.xz

0 comments on commit 4e92776

Please sign in to comment.