Skip to content

Commit 0e17752

Browse files
committed
chore: move all release scripts to github actions
1 parent 1820e96 commit 0e17752

8 files changed

Lines changed: 46 additions & 140 deletions

File tree

.github/workflows/npm-snapshot-release.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/release-rc.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'Release RC'
1+
name: 'Release - Release Candidate'
22

33
on:
44
workflow_dispatch
@@ -25,18 +25,9 @@ jobs:
2525
yarn test
2626
yarn build
2727
28-
- name: 'npm auth'
29-
run: |
30-
npm config set //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN
31-
npm config set //registry.npmjs.org/:username=${NPM_USERNAME}
32-
npm config set //registry.npmjs.org/:email=${NPM_EMAIL}
33-
env:
34-
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
35-
NPM_USERNAME: ${{ secrets.NPM_USERNAME }}
36-
NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
37-
38-
- name: 'Release RC'
28+
- name: publish
3929
run: |
30+
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
4031
git config user.email ${{ secrets.BOT_GIT_EMAIL }}
4132
git config user.name ${{ secrets.BOT_GIT_USERNAME }}
4233
${GITHUB_WORKSPACE}/node_modules/.bin/lerna publish prerelease \
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: 'Release - Snapshot'
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
if: "!contains(github.event.head_commit.message, '[ci skip]')"
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2.3.2
15+
with:
16+
token: ${{ secrets.ACCESS_TOKEN }}
17+
fetch-depth: 0
18+
19+
- name: Use Node.js
20+
uses: actions/setup-node@v2.1.0
21+
with:
22+
node-version: '12.x'
23+
24+
- name: Install, test and build
25+
run: |
26+
yarn install
27+
yarn test
28+
yarn build
29+
30+
- name: publish
31+
run: |
32+
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
33+
git config user.email ${{ secrets.BOT_GIT_EMAIL }}
34+
git config user.name ${{ secrets.BOT_GIT_USERNAME }}
35+
36+
git_hash=$(git rev-parse --short "$GITHUB_SHA")
37+
38+
${GITHUB_WORKSPACE}/node_modules/.bin/lerna publish "0.0.0-${git_hash}" \
39+
--no-push \
40+
--no-git-tag-version \
41+
--dist-tag dev \

.github/workflows/release.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,9 @@ jobs:
3030
yarn test
3131
yarn build
3232
33-
- name: 'npm auth'
34-
run: |
35-
npm config set //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN
36-
npm config set //registry.npmjs.org/:username=${NPM_USERNAME}
37-
npm config set //registry.npmjs.org/:email=${NPM_EMAIL}
38-
env:
39-
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
40-
NPM_USERNAME: ${{ secrets.NPM_USERNAME }}
41-
NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
42-
43-
- name: 'Release RC'
33+
- name: publish
4434
run: |
35+
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
4536
git config user.email ${{ secrets.BOT_GIT_EMAIL }}
4637
git config user.name ${{ secrets.BOT_GIT_USERNAME }}
4738
${GITHUB_WORKSPACE}/node_modules/.bin/lerna publish ${{ github.event.inputs.release_type }} \

scripts/ci/release-rc.sh

Lines changed: 0 additions & 33 deletions
This file was deleted.

scripts/ci/release-snapshot.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

scripts/ci/release.sh

Lines changed: 0 additions & 31 deletions
This file was deleted.

scripts/ci/setup-npm.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)