Skip to content

Commit b5374ba

Browse files
ci: test publish-dry-run for tags
1 parent 5902020 commit b5374ba

File tree

2 files changed

+52
-21
lines changed

2 files changed

+52
-21
lines changed
Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Checking code
1+
name: Code check
22

33
on:
44
push:
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
setup:
11-
if: github.event.pull_request.draft != true
11+
# if: github.event.pull_request.draft != true
1212
runs-on: ubuntu-latest
1313

1414
steps:
@@ -30,12 +30,13 @@ jobs:
3030
if: steps.node_modules_cache.outputs.cache-hit != 'true'
3131
- run: yarn install-peers
3232
if: steps.node_modules_cache.outputs.cache-hit != 'true'
33+
- run: git diff
3334
- name: Ensure project is clean
3435
uses: numtide/clean-git-action@v1
3536
if: steps.cache-node_modules.outputs.cache-hit != 'true'
3637

3738
build:
38-
if: github.event.pull_request.draft != true
39+
# if: github.event.pull_request.draft != true
3940
needs: setup
4041
runs-on: ubuntu-latest
4142

@@ -56,24 +57,24 @@ jobs:
5657
- name: Ensure project is clean
5758
uses: numtide/clean-git-action@v1
5859

59-
publish-dry-run:
60-
if: github.event.pull_request.draft != true
61-
needs: build
62-
runs-on: ubuntu-latest
60+
# publish-dry-run:
61+
# if: github.event.pull_request.draft != true
62+
# needs: build
63+
# runs-on: ubuntu-latest
6364

64-
steps:
65-
- uses: actions/checkout@v3
66-
- name: Use Node.js
67-
uses: actions/setup-node@v3
68-
with:
69-
node-version-file: .nvmrc
70-
- name: Cache node_modules
71-
uses: actions/cache@v3
72-
id: use_node_modules
73-
with:
74-
key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
75-
path: node_modules
65+
# steps:
66+
# - uses: actions/checkout@v3
67+
# - name: Use Node.js
68+
# uses: actions/setup-node@v3
69+
# with:
70+
# node-version-file: .nvmrc
71+
# - name: Cache node_modules
72+
# uses: actions/cache@v3
73+
# id: use_node_modules
74+
# with:
75+
# key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
76+
# path: node_modules
7677

77-
- name: publish --dry-run
78-
run: npm publish --dry-run
78+
# - name: publish --dry-run
79+
# run: npm publish --dry-run
7980

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: dry-run publish
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Code check"]
6+
tags: ["*"]
7+
types:
8+
- completed
9+
jobs:
10+
dry-run-deploy:
11+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Use Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version-file: .nvmrc
21+
22+
- name: Cache node_modules
23+
uses: actions/cache@v3
24+
id: node_modules_cache
25+
with:
26+
key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
27+
path: node_modules
28+
29+
- name: publish --dry-run
30+
run: npm publish --dry-run

0 commit comments

Comments
 (0)