Skip to content

Commit 40d3464

Browse files
committed
1 parent aef59fb commit 40d3464

File tree

1 file changed

+43
-3
lines changed

1 file changed

+43
-3
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [master]
88

99
jobs:
10-
build:
10+
test:
1111
runs-on: ubuntu-latest
1212

1313
strategy:
@@ -25,5 +25,45 @@ jobs:
2525
- run: yarn add react@${{ matrix.REACT_DIST }} react-dom@${{ matrix.REACT_DIST }}
2626
- run: yarn --cwd www
2727
- run: yarn test
28-
- run: npm run build
29-
- run: npm run semantic-release
28+
- name: Dry release
29+
uses: cycjimmy/semantic-release-action@v2
30+
with:
31+
dry_run: true
32+
semantic_version: 17
33+
branches: |
34+
[
35+
'master',
36+
{name: 'alpha', prerelease: true}
37+
]
38+
env:
39+
# These are not available on forks so we might as well remove them?
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
42+
43+
release:
44+
needs: test
45+
runs-on: ubuntu-latest
46+
if: ${{ github.repository == 'reactjs/react-transition-group' &&
47+
contains('refs/heads/master,refs/heads/alpha',
48+
github.ref) && github.event_name == 'push' }}
49+
steps:
50+
- uses: styfle/[email protected]
51+
- uses: actions/checkout@v2
52+
- name: Use Node.js 14
53+
uses: actions/setup-node@v2
54+
with:
55+
node-version: 14
56+
cache: 'npm'
57+
- run: yarn
58+
- name: Release
59+
uses: cycjimmy/semantic-release-action@v2
60+
with:
61+
semantic_version: 17
62+
branches: |
63+
[
64+
'master',
65+
{name: 'alpha', prerelease: true}
66+
]
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)