Skip to content

Commit 85c02e4

Browse files
committed
modify ci
1 parent dc26a58 commit 85c02e4

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

.github/workflows/deploy-main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2121
- uses: actions/checkout@v2
2222

23+
- name: Prepare
24+
run: npm run prepare:ci -- ${{ github.ref }}
25+
2326
# Install dependencies
2427
- name: Install
2528
run: npm install

ci.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
sed -i "s/@oslabs-beta\\/expressbridge/expressbridge/g" package.json
2+
# @oslabs-beta/expressbridge -> expresbridge
3+
4+
# specify delimiter
5+
IFS='/';
6+
7+
# read in github.ref property
8+
read -ra ref <<< $1
9+
10+
TAG_VERSION = $ref[3]
11+
12+
echo $TAG_VERSION
13+
14+
sed -i "s/\"version.*/\"version\": \"$TAG_VERSION\",/g" package.json

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "@oslabs-beta/expressbridge",
3-
"version": "0.0.26",
2+
"name": "expressbridge",
3+
"version": "1.1.0",
44
"description": "expressbridge is a event-driven microservice framework for Node.js",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",
@@ -12,6 +12,7 @@
1212
"format": "prettier -c src/*",
1313
"prepare": "husky install",
1414
"lint": "eslint src/**/*.ts",
15+
"prepare:ci": "./ci.sh",
1516
"format:fix": "prettier -c src/* --write",
1617
"lint:fix": "eslint src/**/*.ts --fix"
1718
},

0 commit comments

Comments
 (0)