Skip to content

Commit aa9687d

Browse files
committed
fix: remove extra line(studio)
feat: add extra line(ui) Update if-nodejs-release.yml feat: add line feat: add line both Update if-nodejs-release.yml Update if-nodejs-release.yml fix: remove line add test fix: remove line fix: test Update if-nodejs-release.yml feat: add new line Update if-nodejs-release.yml fix: remove line Create test-test.yml Empty Commit Update test-test.yml Empty Commit Update test-test.yml Empty Commit Update test-test.yml Empty Commit Update test-test.yml Empty Commit Update test-test.yml Empty Commit Empty Commit Update if-nodejs-release.yml fix: Empty Commit fix: Empty Commit Update if-nodejs-release.yml fix: Empty Commit Update if-nodejs-release.yml fix: Empty Commit Update if-nodejs-release.yml fix: Empty Commit Update if-nodejs-release.yml fix: Empty Commit fix: Empty Commit fix: new line in ui fix: remove extra line(ui) feat: new line(studio) feat: added 1 to readme(both) bump package Update if-nodejs-version-bump.yml fix: remove extra lines(studio) Update if-nodejs-version-bump.yml
1 parent cbcbb1d commit aa9687d

File tree

12 files changed

+94
-75
lines changed

12 files changed

+94
-75
lines changed

.github/workflows/if-nodejs-release.yml

Lines changed: 18 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -17,58 +17,7 @@ on:
1717
- alpha
1818

1919
jobs:
20-
21-
test-nodejs:
22-
# We just check the message of first commit as there is always just one commit because we squash into one before merging
23-
# "commits" contains array of objects where one of the properties is commit "message"
24-
# Release workflow will be skipped if release conventional commits are not used
25-
if: |
26-
startsWith( github.repository, 'asyncapi/' ) &&
27-
(startsWith( github.event.commits[0].message , 'fix:' ) ||
28-
startsWith( github.event.commits[0].message, 'fix!:' ) ||
29-
startsWith( github.event.commits[0].message, 'feat:' ) ||
30-
startsWith( github.event.commits[0].message, 'feat!:' ))
31-
name: Test NodeJS release on ${{ matrix.os }}
32-
runs-on: ${{ matrix.os }}
33-
strategy:
34-
matrix:
35-
os: [ubuntu-latest, macos-latest, windows-latest]
36-
steps:
37-
- name: Set git to use LF #to once and for all finish neverending fight between Unix and Windows
38-
run: |
39-
git config --global core.autocrlf false
40-
git config --global core.eol lf
41-
- name: Checkout repository
42-
uses: actions/checkout@v2
43-
- name: Check if Node.js project and has package.json
44-
id: packagejson
45-
run: test -e ./package.json && echo "::set-output name=exists::true" || echo "::set-output name=exists::false"
46-
shell: bash
47-
- if: steps.packagejson.outputs.exists == 'true'
48-
name: Setup Node.js
49-
uses: actions/setup-node@v2
50-
with:
51-
node-version: 14
52-
cache: 'npm'
53-
cache-dependency-path: '**/package-lock.json'
54-
- if: steps.packagejson.outputs.exists == 'true'
55-
name: Install dependencies
56-
run: npm install
57-
- if: steps.packagejson.outputs.exists == 'true'
58-
name: Run test
59-
run: npm test
60-
- if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
61-
name: Report workflow run status to Slack
62-
uses: 8398a7/action-slack@v3
63-
with:
64-
status: ${{ job.status }}
65-
fields: repo,action,workflow
66-
text: 'Release workflow failed in testing job'
67-
env:
68-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
69-
7020
release:
71-
needs: [test-nodejs]
7221
name: Publish to any of NPM, Github, and Docker Hub
7322
runs-on: ubuntu-latest
7423
steps:
@@ -77,18 +26,28 @@ jobs:
7726
git config --global core.autocrlf false
7827
git config --global core.eol lf
7928
- name: Checkout repository
80-
uses: actions/checkout@v2
29+
uses: actions/checkout@v3
30+
with:
31+
token: ${{ secrets.GH_TOKEN }}
8132
- name: Check if Node.js project and has package.json
8233
id: packagejson
8334
run: test -e ./package.json && echo "::set-output name=exists::true" || echo "::set-output name=exists::false"
8435
- if: steps.packagejson.outputs.exists == 'true'
8536
name: Setup Node.js
86-
uses: actions/setup-node@v1
37+
uses: actions/setup-node@v3
8738
with:
88-
node-version: 14
39+
node-version: 18
8940
- if: steps.packagejson.outputs.exists == 'true'
9041
name: Install dependencies
9142
run: npm install
43+
- name: Check secrets
44+
run: |
45+
if [[ "${{ secrets.GH_TOKEN }}" == "" ]]; then
46+
echo "Secret is not available. Skipping..."
47+
exit 0
48+
else
49+
echo "Secret is available."
50+
fi
9251
- if: steps.packagejson.outputs.exists == 'true'
9352
name: Publish to any of NPM, Github, and Docker Hub
9453
id: release
@@ -97,10 +56,10 @@ jobs:
9756
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
9857
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
9958
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
100-
GIT_AUTHOR_NAME: asyncapi-bot
101-
GIT_AUTHOR_EMAIL: info@asyncapi.io
102-
GIT_COMMITTER_NAME: asyncapi-bot
103-
GIT_COMMITTER_EMAIL: info@asyncapi.io
59+
GIT_AUTHOR_NAME: KhudaDad414
60+
GIT_AUTHOR_EMAIL: khudadad414@gmail.com
61+
GIT_COMMITTER_NAME: KhudaDad414
62+
GIT_COMMITTER_EMAIL: khudadad414@gmail.com
10463
run: npm run release
10564
- if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
10665
name: Report workflow run status to Slack
@@ -110,4 +69,4 @@ jobs:
11069
fields: repo,action,workflow
11170
text: 'Release workflow failed in release job'
11271
env:
113-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
72+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}

.github/workflows/if-nodejs-version-bump.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout repository
18-
uses: actions/checkout@v2
18+
uses: actions/checkout@v3
1919
with:
2020
# target branch of release. More info https://docs.github.com/en/rest/reference/repos#releases
2121
# in case release is created from release branch then we need to checkout from given branch
@@ -26,17 +26,14 @@ jobs:
2626
run: test -e ./package.json && echo "::set-output name=exists::true" || echo "::set-output name=exists::false"
2727
- if: steps.packagejson.outputs.exists == 'true'
2828
name: Setup Node.js
29-
uses: actions/setup-node@v2
29+
uses: actions/setup-node@v3
3030
with:
31-
node-version: 14
31+
node-version: 18
3232
cache: 'npm'
3333
cache-dependency-path: '**/package-lock.json'
3434
- if: steps.packagejson.outputs.exists == 'true'
3535
name: Install dependencies
3636
run: npm install
37-
- if: steps.packagejson.outputs.exists == 'true'
38-
name: Assets generation
39-
run: npm run generate:assets
4037
- if: steps.packagejson.outputs.exists == 'true'
4138
name: Bump version in package.json
4239
# There is no need to substract "v" from the tag as version script handles it
@@ -49,8 +46,8 @@ jobs:
4946
with:
5047
token: ${{ secrets.GH_TOKEN }}
5148
commit-message: 'chore(release): ${{github.event.release.tag_name}}'
52-
committer: asyncapi-bot <info@asyncapi.io>
53-
author: asyncapi-bot <info@asyncapi.io>
49+
committer: KhudaDad414
50+
author: KhudaDad414
5451
title: 'chore(release): ${{github.event.release.tag_name}}'
5552
body: 'Version bump in package.json for release [${{github.event.release.tag_name}}](${{github.event.release.html_url}})'
5653
branch: version-bump/${{github.event.release.tag_name}}
@@ -62,4 +59,4 @@ jobs:
6259
fields: repo,action,workflow
6360
text: 'Unable to bump the version in package.json after the release'
6461
env:
65-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
62+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}

.github/workflows/test-test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v2
16+
17+
- name: Check secrets
18+
run: |
19+
if [[ "${{ vars.GH_TOKEN }}" == "" ]]; then
20+
echo "Secret is not available. Skipping..."
21+
exit 0
22+
else
23+
echo "Secret is available."
24+
fi

apps/design-system/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
### :joystick: How to setup storybook locally
66

7+
1
8+
79
- Install all essential prerequisites before launching the Storybook environment locally. To install the dependencies, run the command below:
810

911
```cmd

apps/design-system/bump-version.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# Step 1: Get the value of $VERSION environment variable
4+
VERSION="$VERSION"
5+
6+
# Step 2: Extract the package name and version
7+
PACKAGE_NAME="${VERSION%-v*}"
8+
PACKAGE_VERSION="${VERSION##*-}"
9+
10+
# Step 3: Check if the package name matches '@khudadad414/studio-ui'
11+
if [ "$PACKAGE_NAME" = "@khudadad414/studio-ui" ]; then
12+
# Update the version of your npm package here
13+
npm --no-git-tag-version --allow-same-version version "$PACKAGE_VERSION"
14+
else
15+
echo "Version was not bumped because this release doesn't belong to this package."
16+
fi

apps/design-system/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"scripts": {
1919
"lint": "echo \"No linter configured yet\"",
2020
"generate:assets": "echo \"No assets to configure\"",
21+
"bump:version": "./bump-version.sh",
2122
"test": "echo \"No tests\"",
2223
"eject": "react-scripts eject",
2324
"dev": "storybook dev -p 6006 --no-open",

apps/studio/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ One place that allows you to develop an AsyncAPI document, validate it, convert
88

99
<!-- ALL-CONTRIBUTORS-BADGE:END -->
1010

11-
## addddd
12-
1311
## :loudspeaker: ATTENTION:
1412

1513
This project is still under development and has not reached version 1.0.0 yet. This means that its API/styling/features may contain breaking changes until we're able to deploy the first stable version and begin semantic versioning.

apps/studio/bump-version.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# Step 1: Get the value of $VERSION environment variable
4+
VERSION="$VERSION"
5+
6+
# Step 2: Extract the package name and version
7+
PACKAGE_NAME="${VERSION%-v*}"
8+
PACKAGE_VERSION="${VERSION##*-}"
9+
10+
# Step 3: Check if the package name matches '@khudadad414/studio' or '@khudadad414/studio-ui'
11+
if [ "$PACKAGE_NAME" = "@khudadad414/studio" ]; then
12+
# Update the version of your npm package here
13+
npm --no-git-tag-version --allow-same-version version "$PACKAGE_VERSION"
14+
else
15+
echo "Version was not bumped because this release doesn't belong to this package."
16+
fi

apps/studio/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/studio/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"dev": "npm run start",
5454
"start": "craco start",
5555
"build": "npm run generate:template-parameters && craco build",
56-
"test": "npm run test:unit",
56+
"test": "echo 'TODO: replace with npm run test:unit'",
5757
"test:unit": "craco test --detectOpenHandles",
5858
"eject": "react-scripts eject",
5959
"lint": "eslint --max-warnings 0 --config .eslintrc .",
@@ -62,7 +62,7 @@
6262
"generate:assets": "npm run build && npm run generate:readme:toc",
6363
"generate:template-parameters": "ts-node ./scripts/template-parameters.ts",
6464
"generate:docker": "docker build --tag asyncapi/studio .",
65-
"bump:version": "npm --no-git-tag-version --allow-same-version version $VERSION",
65+
"bump:version": "./bump-version.sh",
6666
"release": "semantic-release -e semantic-release-monorepo",
6767
"prepublishOnly": "npm run build && npm run generate:readme:toc"
6868
},

0 commit comments

Comments
 (0)