Skip to content

Commit e585c6a

Browse files
authored
Merge pull request #175 from ovotech/BPCPOD-11801-cleanup
BPCPOD-11801 Link repo in deployed packages, clean up leftover circleci stuff
2 parents e35ff03 + 9bca559 commit e585c6a

18 files changed

Lines changed: 97 additions & 102 deletions

File tree

.circleci/config.yml

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

.github/workflows/main.yml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ jobs:
4242

4343
steps:
4444
- name: Checkout code
45-
uses: actions/checkout@v3
45+
uses: actions/checkout@v4
4646

4747
- name: Setup Node.js
48-
uses: actions/setup-node@v3
48+
uses: actions/setup-node@v4
4949
with:
5050
node-version: '12'
5151

5252
- name: Cache dependencies
53-
uses: actions/cache@v3
53+
uses: actions/cache@v4
5454
with:
5555
path: ~/.cache/yarn
5656
key: v1-${{ hashFiles('**/yarn.lock') }}
@@ -76,17 +76,19 @@ jobs:
7676
needs: test
7777
if: github.ref == 'refs/heads/master'
7878
runs-on: ubuntu-latest
79+
outputs:
80+
has_changes: ${{ steps.check_changes.outputs.has_changes }}
7981
steps:
8082
- name: Checkout code
81-
uses: actions/checkout@v3
83+
uses: actions/checkout@v4
8284

8385
- name: Setup Node.js
84-
uses: actions/setup-node@v3
86+
uses: actions/setup-node@v4
8587
with:
8688
node-version: '12'
8789

8890
- name: Cache dependencies
89-
uses: actions/cache@v3
91+
uses: actions/cache@v4
9092
with:
9193
path: ~/.cache/yarn
9294
key: v1-${{ hashFiles('**/yarn.lock') }}
@@ -103,34 +105,42 @@ jobs:
103105
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
104106

105107
- name: List changed packages
108+
id: check_changes
106109
run: |
107-
echo "### Following packages will be published" >> $GITHUB_STEP_SUMMARY
108-
yarn lerna exec --loglevel silent --concurrency 1 -- \
110+
echo "### Following pending deployments found" >> $GITHUB_STEP_SUMMARY
111+
OUTPUT=$(yarn lerna exec --loglevel silent --concurrency 1 -- \
109112
'VERSION=$(node -p "require(\"./package.json\").version"); \
110113
if [ "$(npm view $LERNA_PACKAGE_NAME version --registry=https://npm.pkg.github.com/ 2>/dev/null || echo "0.0.0")" != "$VERSION" ]; then \
111-
echo "- **$LERNA_PACKAGE_NAME** - will publish version $VERSION" >> $GITHUB_STEP_SUMMARY; \
112-
fi'
114+
echo "- **$LERNA_PACKAGE_NAME** - will publish version $VERSION"; \
115+
fi' | grep '\- \*\*' || true)
116+
if [ -n "$OUTPUT" ]; then
117+
echo "$OUTPUT" >> $GITHUB_STEP_SUMMARY
118+
echo "has_changes=true" >> $GITHUB_OUTPUT
119+
else
120+
echo "has_changes=false" >> $GITHUB_OUTPUT
121+
echo "- None" >> $GITHUB_STEP_SUMMARY
122+
fi
113123
114124
publish:
115125
needs: prepare-publish
116-
if: github.ref == 'refs/heads/master'
126+
if: github.ref == 'refs/heads/master' && needs.prepare-publish.outputs.has_changes == 'true'
117127
runs-on: ubuntu-latest
118128
environment:
119129
name: github-npm-registry
120130
steps:
121131
- name: Checkout code
122-
uses: actions/checkout@v3
132+
uses: actions/checkout@v4
123133

124134
- name: Setup Node.js
125-
uses: actions/setup-node@v3
135+
uses: actions/setup-node@v4
126136
with:
127137
node-version: '12'
128138

129139
- name: Setup npmrc
130140
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
131141

132142
- name: Cache dependencies
133-
uses: actions/cache@v3
143+
uses: actions/cache@v4
134144
with:
135145
path: ~/.cache/yarn
136146
key: v1-${{ hashFiles('**/yarn.lock') }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# BIT Kafka Tools
22

3-
[![CircleCI](https://circleci.com/gh/ovotech/bit-node-tools.svg?style=svg&circle-token=ae40b0f9ff7943343688a0319478e70091e37fbe)](https://circleci.com/gh/ovotech/bit-node-tools)
3+
[![Build Status](https://github.com/ovotech/bit-node-tools/actions/workflows/main.yml/badge.svg)](https://github.com/ovotech/bit-node-tools/actions/workflows/main.yml)
44

55
BIT Team tools for working with Kafka, Avro and other misc stuff. They are split into several independent packages that can be imported separately.
66

@@ -84,7 +84,7 @@ yarn lint
8484
## Deployment
8585

8686
1. MANUALLY bump the package version along with your changes
87-
2. On merge to master lerna will pick up on the changes and output what will be published in the GitHub actions job `prepare-publish`
87+
2. On merge to master lerna will pick up on the changes and output what will be published in the GitHub actions pipeline under `prepare-publish summary`
8888
3. MANUALLY approve deployment for the GitHub actions job `publish`
8989

9090
## Built With

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,5 @@
1414
},
1515
"devDependencies": {
1616
"lerna": "^3.14.1"
17-
},
18-
"repository": {
19-
"url": "https://github.com/ovotech/bit-node-tools",
20-
"type": "git"
21-
}
17+
}
2218
}

packages/apollo-datasource-axios/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
"types": "dist/index.d.ts",
88
"author": "Ivan Kerin <ikerin@gmail.com>",
99
"license": "Apache-2.0",
10+
"repository": {
11+
"type": "git",
12+
"url": "git+https://github.com/ovotech/bit-node-tools.git",
13+
"directory": "packages/keycloak-auth"
14+
},
1015
"peerDependencies": {
1116
"axios": "*"
1217
},

packages/avro-logical-types/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
"types": "dist/index.d.ts",
88
"author": "Ivan Kerin <ikerin@gmail.com>",
99
"license": "Apache-2.0",
10+
"repository": {
11+
"type": "git",
12+
"url": "git+https://github.com/ovotech/bit-node-tools.git",
13+
"directory": "packages/keycloak-auth"
14+
},
1015
"peerDependencies": {
1116
"avsc": "*"
1217
},

packages/avro-stream/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
"types": "dist/index.d.ts",
88
"author": "Ivan Kerin <ikerin@gmail.com>",
99
"license": "Apache-2.0",
10+
"repository": {
11+
"type": "git",
12+
"url": "git+https://github.com/ovotech/bit-node-tools.git",
13+
"directory": "packages/keycloak-auth"
14+
},
1015
"dependencies": {
1116
"@ovotech/schema-registry-api": "^1.0.3",
1217
"avsc": "^5.4.10"

packages/axios-logger/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
"types": "dist/index.d.ts",
88
"author": "Ivan Kerin <ikerin@gmail.com>",
99
"license": "Apache-2.0",
10+
"repository": {
11+
"type": "git",
12+
"url": "git+https://github.com/ovotech/bit-node-tools.git",
13+
"directory": "packages/keycloak-auth"
14+
},
1015
"peerDependencies": {
1116
"axios": "*"
1217
},

packages/bigquery-pg-sink/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
"types": "dist/index.d.ts",
88
"author": "Sam Clift <samjacobclift@gmail.com>",
99
"license": "Apache-2.0",
10+
"repository": {
11+
"type": "git",
12+
"url": "git+https://github.com/ovotech/bit-node-tools.git",
13+
"directory": "packages/keycloak-auth"
14+
},
1015
"scripts": {
1116
"lint-prettier": "prettier --list-different {src,test}/**/*.ts",
1217
"lint-tslint": "tslint --config tslint.json '{src,test}/**/*.ts'",

packages/config-file/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
"types": "dist/index.d.ts",
88
"author": "Ivan Kerin <ikerin@gmail.com>",
99
"license": "Apache-2.0",
10+
"repository": {
11+
"type": "git",
12+
"url": "git+https://github.com/ovotech/bit-node-tools.git",
13+
"directory": "packages/keycloak-auth"
14+
},
1015
"scripts": {
1116
"test": "jest --runInBand",
1217
"lint-prettier": "prettier --list-different {src,test}/**/*.ts",

0 commit comments

Comments
 (0)