Skip to content

Commit e390fdc

Browse files
committed
chore: Simplify release workflow by consolidating build and release steps for Windows, removing unnecessary artifact uploads and streamlining the process
1 parent 3b9845d commit e390fdc

File tree

1 file changed

+8
-46
lines changed

1 file changed

+8
-46
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -14,70 +14,32 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [windows-latest]
17-
17+
1818
runs-on: ${{ matrix.os }}
19-
19+
2020
steps:
2121
- name: Checkout code
2222
uses: actions/checkout@v4
23-
23+
2424
- name: Setup pnpm
2525
uses: pnpm/action-setup@v2
2626
with:
2727
version: latest
28-
28+
2929
- name: Setup Node.js
3030
uses: actions/setup-node@v4
3131
with:
3232
node-version: '18'
3333
cache: 'pnpm'
34-
34+
3535
- name: Install dependencies
3636
run: pnpm install
37-
3837

39-
4038
- name: Build application
4139
run: pnpm run build
42-
43-
- name: Build for Windows
40+
41+
- name: Build and Release for Windows
4442
if: matrix.os == 'windows-latest'
45-
run: pnpm run build:win
43+
run: pnpm run release
4644
env:
4745
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48-
49-
50-
51-
52-
53-
- name: Upload artifacts
54-
uses: actions/upload-artifact@v4
55-
with:
56-
name: release-${{ matrix.os }}
57-
path: |
58-
dist/*.exe
59-
dist/*.zip
60-
if-no-files-found: ignore
61-
62-
release:
63-
needs: build
64-
runs-on: ubuntu-latest
65-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
66-
67-
steps:
68-
- name: Checkout code
69-
uses: actions/checkout@v4
70-
71-
- name: Download all artifacts
72-
uses: actions/download-artifact@v4
73-
with:
74-
path: artifacts
75-
76-
- name: Create Release
77-
uses: softprops/action-gh-release@v1
78-
with:
79-
files: |
80-
artifacts/**/*
81-
generate_release_notes: true
82-
env:
83-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)