Skip to content

Commit

Permalink
✨ feat(action): 修改错误的action
Browse files Browse the repository at this point in the history
  • Loading branch information
wosiwq committed Dec 21, 2023
1 parent 404a0f3 commit be58e8a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 12 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/github-actions-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and Attach Artifacts to Release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist

- name: Archive production artifacts
run: tar -czvf dist.tar.gz dist

- name: Upload Release Asset
id: upload-release-asset
uses: softprops/action-gh-release@v1
with:
files: dist.tar.gz
13 changes: 1 addition & 12 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Attach Artifacts to Release
name: Build
on:
push:
branches:
Expand Down Expand Up @@ -30,14 +30,3 @@ jobs:
with:
name: dist
path: dist

- name: Archive production artifacts
run: tar -czvf dist.tar.gz dist
if: startsWith(github.ref, 'refs/tags/')

- name: Upload Release Asset
id: upload-release-asset
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist.tar.gz

0 comments on commit be58e8a

Please sign in to comment.