Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit fe3f4f7

Browse files
author
Yaniv Davidi
authored
chore: create GH action for prerelease (#79)
* chore: create GH action for prerelease
1 parent 38cf1a7 commit fe3f4f7

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

.github/workflows/prerelease.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: PreRelease
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
Publish:
8+
name: PreRelease
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: checkout
12+
uses: actions/checkout@v2
13+
14+
- uses: actions/setup-node@v1
15+
with:
16+
node-version: 12
17+
registry-url: https://registry.npmjs.org/
18+
19+
- name: Install Packages
20+
run: yarn install
21+
22+
- name: Build
23+
run: yarn build
24+
25+
- name: Authenticate with Registry
26+
run: |
27+
yarn logout
28+
echo "registry=http://registry.npmjs.org/" >> .npmrc
29+
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
30+
npm whoami
31+
env:
32+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
33+
34+
- name: Publish package
35+
run: |
36+
yarn publish:ci:prerelease --preid $(echo ${GITHUB_REF##*/}) patch

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"prettier": "prettier --config .prettierrc.yml --write \"**/*.{ts,tsx,js,jsx,json}\"",
1111
"version:update": "lerna run version:update",
1212
"version": "git add packages/**/version.ts",
13-
"publish:ci": "lerna publish --yes --allow-branch master --create-release github --conventionalCommits"
13+
"publish:ci": "lerna publish --yes --allow-branch master --create-release github --conventionalCommits",
14+
"publish:ci:prerelease": "lerna publish --yes --canary"
1415
},
1516
"devDependencies": {
1617
"husky": "^4.3.6",

0 commit comments

Comments
 (0)