Skip to content

Commit 83483f0

Browse files
authored
Merge pull request #44 from rmrs/ci/add_semantic_release
Ci: add semantic release
2 parents 134b6fd + ffdc584 commit 83483f0

File tree

3 files changed

+4529
-137
lines changed

3 files changed

+4529
-137
lines changed

.github/workflows/publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Node CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v1
14+
- name: Use Node.js 12
15+
uses: actions/setup-node@v1
16+
with:
17+
node-version: 12.x
18+
- uses: actions/cache@v1
19+
with:
20+
path: ~/.cache/yarn
21+
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
22+
restore-keys: |
23+
${{ runner.os }}-yarn-
24+
- name: update yarn to latest version
25+
run: |
26+
sudo apt update && sudo apt install yarn
27+
- name: yarn install and publish
28+
run: |
29+
node --version
30+
npm --version
31+
yarn --version
32+
yarn --frozen-lockfile
33+
yarn semantic-release
34+
env:
35+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
"url": "https://github.com/rmrs/react-native-settings.git"
99
},
1010
"scripts": {
11-
"tag": "git tag \"v$npm_package_version\" && git push --tags",
12-
"prepublishOnly": "yarn run tag"
11+
"semantic-release": "semantic-release"
1312
},
1413
"keywords": [
1514
"react-native",
@@ -29,7 +28,8 @@
2928
"@commitlint/cli": "^8.3.4",
3029
"@commitlint/config-conventional": "^8.3.4",
3130
"husky": "^4.0.6",
32-
"prettier": "^1.19.1"
31+
"prettier": "^1.19.1",
32+
"semantic-release": "^16.0.1"
3333
},
3434
"husky": {
3535
"hooks": {

0 commit comments

Comments
 (0)