Skip to content

Commit 8921c2d

Browse files
committed
workflow: test publish commit workflow
1 parent 0a16eae commit 8921c2d

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/publish-commit.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: publish-commit
2+
3+
on:
4+
workflow_run:
5+
workflows: ['ci']
6+
branches: [main, minor, test-publish]
7+
types:
8+
- completed
9+
10+
jobs:
11+
pubilsh:
12+
if: >
13+
github.repository == 'vuejs/core' &&
14+
github.event.workflow_run.event == 'push' &&
15+
github.event.workflow_run.conclusion == 'success'
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Install pnpm
22+
uses: pnpm/action-setup@v4
23+
24+
- name: Install Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version-file: '.node-version'
28+
registry-url: 'https://npm.pkg.github.com'
29+
cache: 'pnpm'
30+
31+
- name: Install deps
32+
run: pnpm install
33+
34+
- name: Build and publish
35+
id: publish
36+
run: |
37+
pnpm release 0.0.0-${{ github.event.workflow_run.head_commit }} --tag ${{ github.event.workflow_run.head_branch }} --publishOnly
38+
env:
39+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)