Skip to content

Commit e5d03b1

Browse files
Update publish.yml
1 parent 8453ccf commit e5d03b1

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,31 @@ on:
88
types: [ created ]
99

1010
jobs:
11-
build:
11+
setup:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v3
1515
- uses: actions/setup-node@v3
1616
with:
1717
node-version: 18
1818
registry-url: https://registry.npmjs.org/
19+
- name: Git setup
20+
if: success()
21+
run: |
22+
git config --local user.email "action@github.com"
23+
git config --local user.name "GitHub Action"
24+
25+
build:
26+
needs: setup
27+
runs-on: ubuntu-latest
28+
steps:
1929
- run: npm i
2030
- run: npm run build
21-
2231

2332
publish:
2433
needs: build
2534
runs-on: ubuntu-latest
2635
steps:
27-
- uses: actions/checkout@v3
2836
- run: npm version ${{ github.event.release.tag_name }} --no-git-tag-version
2937
- run: git add .
3038
- run: git commit -m "Release v${{ github.event.release.tag_name }}"

0 commit comments

Comments
 (0)