Skip to content

Commit

Permalink
✨ feat(github action):添加action的部分工作条件
Browse files Browse the repository at this point in the history
  • Loading branch information
wosiwq committed Dec 20, 2023
1 parent 152d995 commit 9e394cc
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Build and Attach Artifacts to Release
on: push
on:
push:
branches:
- main
paths-ignore:
- '**/README.md'
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -8,22 +13,28 @@ jobs:
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
if: startsWith(github.ref, 'refs/tags/')

- name: Upload Release Asset
id: upload-release-asset
uses: softprops/action-gh-release@v1
Expand Down

0 comments on commit 9e394cc

Please sign in to comment.