Skip to content

Commit 4290ce2

Browse files
authored
📦 Add publish workflows (#12)
1 parent 06e3d45 commit 4290ce2

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: on-push-publish-to-npm
2+
on:
3+
push:
4+
branches:
5+
- master
6+
paths:
7+
- "package.json"
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v1
14+
with:
15+
node-version: 10
16+
- run: npm install
17+
- run: npm test
18+
- uses: JS-DevTools/npm-publish@v1
19+
with:
20+
token: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: version-bump-publish
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
level:
6+
description: "<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease"
7+
required: true
8+
default: "patch"
9+
tag:
10+
description: "The tag to publish to."
11+
required: false
12+
default: "latest"
13+
jobs:
14+
checkout:
15+
name: checkout
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- run: |
20+
git config user.name github-actions
21+
git config user.email github-actions@github.com
22+
- uses: actions/setup-node@v1
23+
with:
24+
node-version: 10
25+
- run: |
26+
npm install
27+
npm test
28+
- name: bump and pub
29+
if: ${{ github.event.inputs.level != '' }}
30+
run: |
31+
npm version ${{ github.event.inputs.level }}
32+
git push
33+
- uses: JS-DevTools/npm-publish@v1
34+
with:
35+
token: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
36+
tag: ${{ github.event.inputs.tag }}
37+
access: "public"

0 commit comments

Comments
 (0)