File tree 3 files changed +39
-34
lines changed
3 files changed +39
-34
lines changed Original file line number Diff line number Diff line change 10
10
11
11
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
12
12
jobs :
13
- # This workflow contains a single job called "build"
14
- build :
15
- # The type of runner that the job will run on
13
+ verion_check :
16
14
runs-on : ubuntu-latest
15
+ steps :
16
+ - name : Checkout code from the pull request
17
+ uses : actions/checkout@v2
18
+
19
+ - name : version check
20
+ run : |
21
+ ls
22
+ ls ./bin/utils/
23
+ chmod +x ./bin/utils/check_version.sh
24
+ cd javascript
25
+ ../bin/utils/check_version.sh
17
26
18
- # Steps represent a sequence of tasks that will be executed as part of the job
27
+ build :
28
+ needs : verion_check
29
+ runs-on : ubuntu-latest
19
30
steps :
20
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
21
31
- uses : actions/checkout@v2
22
32
23
- # Runs a set of commands using the runners shell
24
- - name : Install, Build and Test
33
+ - name : Install, Build
25
34
run : |
26
35
sudo npm install -g babel-cli
27
36
cd javascript
28
37
npm install
29
38
npm run build
30
-
39
+
40
+ publish :
41
+ needs : build
42
+ runs-on : ubuntu-latest
43
+ steps :
44
+ - name : Publish
45
+ run : |
46
+ echo "publish..."
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ PACKAGE_NAME=$( grep ' "name"' package.json | cut -d ' "' -f4 | tr -d ' [[:space:]]' )
4
+ NPM_PACKAGE_VERSIONS=$( npm view $PACKAGE_NAME versions)
5
+ PACKAGE_VERSION=$( grep ' "version"' package.json | cut -d ' "' -f4 | tr -d ' [[:space:]]' )
6
+
7
+ echo " PACKAGE_NAME: " $PACKAGE_NAME
8
+ echo " NPM_PACKAGE_VERSIONS: " $NPM_PACKAGE_VERSION
9
+ echo " PACKAGE_VERSION: " $PACKAGE_VERSION
10
+
11
+ if [[ ${NPM_PACKAGE_VERSIONS[*]} =~ $PACKAGE_VERSION ]]
12
+ then
13
+ echo " The version number is already being used"
14
+ exit 1
15
+ fi
You can’t perform that action at this time.
0 commit comments