Skip to content

Commit a9296ac

Browse files
ci: added artifact.yml
1 parent 1e886b3 commit a9296ac

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/artifact.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Artifact
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
types: [opened, reopened]
7+
branches: [master]
8+
9+
jobs:
10+
artifact:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v4
15+
- name: Install NodeJS
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 18
19+
registry-url: 'https://registry.npmjs.org/'
20+
- name: Install Yarn
21+
run: npm install -g yarn
22+
- name: Install dependencies
23+
run: yarn install
24+
- name: Build project
25+
run: yarn run build
26+
- name: Pack Packages
27+
run: yarn pack
28+
- name: Find tgz name
29+
id: tgz
30+
run: |
31+
FILE=$(ls ./*.tgz)
32+
echo "package=$FILE" >> $GITHUB_OUTPUT
33+
echo "packageName=$(basename "$FILE" .tgz)" >> $GITHUB_OUTPUT
34+
- name: Upload Artifact
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: ${{ steps.tgz.outputs.packageName }}
38+
path: ${{ steps.tgz.outputs.package }}

0 commit comments

Comments
 (0)