Skip to content

Commit a52f9cc

Browse files
authored
Merge pull request #21 from uiur/master
Release 2022-01-18 07:22:50
2 parents 82ec5bb + 33bfd71 commit a52f9cc

File tree

4 files changed

+2702
-18
lines changed

4 files changed

+2702
-18
lines changed

.github/workflows/create-pr.js.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Create a pull request for QA
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Use Node.js
14+
uses: actions/setup-node@v2
15+
with:
16+
node-version: 16.x
17+
cache: 'npm'
18+
19+
- run: npm ci
20+
- run: npm run build --if-present
21+
- name: Create a release pull request
22+
env:
23+
GITHUB_PR_RELEASE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
25+
run: |
26+
./cli/index.js uiur/github-pr-release

.github/workflows/release.js.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: npm publish
2+
on:
3+
pull_request:
4+
types: [ closed ]
5+
6+
# Enable running this workflow manually from the Actions tab
7+
workflow_dispatch:
8+
9+
jobs:
10+
publish:
11+
# Run this job on master when a release PR is merged
12+
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.head.ref == 'master' }}
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions/setup-node@v2
17+
with:
18+
node-version: '16.x'
19+
cache: 'npm'
20+
- run: npm ci
21+
- run: npm run build --if-present
22+
- run: npm test
23+
- run: npm run release --ci
24+
env:
25+
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)