forked from asyncapi/studio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
2892e78
commit b781e31
Showing
11 changed files
with
88 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,57 +17,7 @@ on: | |
- alpha | ||
|
||
jobs: | ||
|
||
test-nodejs: | ||
# We just check the message of first commit as there is always just one commit because we squash into one before merging | ||
# "commits" contains array of objects where one of the properties is commit "message" | ||
# Release workflow will be skipped if release conventional commits are not used | ||
if: | | ||
(startsWith( github.event.commits[0].message , 'fix:' ) || | ||
startsWith( github.event.commits[0].message, 'fix!:' ) || | ||
startsWith( github.event.commits[0].message, 'feat:' ) || | ||
startsWith( github.event.commits[0].message, 'feat!:' )) | ||
name: Test NodeJS release on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
steps: | ||
- name: Set git to use LF #to once and for all finish neverending fight between Unix and Windows | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Check if Node.js project and has package.json | ||
id: packagejson | ||
run: test -e ./package.json && echo "::set-output name=exists::true" || echo "::set-output name=exists::false" | ||
shell: bash | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'npm' | ||
cache-dependency-path: '**/package-lock.json' | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Install dependencies | ||
run: npm install | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Run test | ||
run: npm test | ||
- if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel | ||
name: Report workflow run status to Slack | ||
uses: 8398a7/action-slack@v3 | ||
with: | ||
status: ${{ job.status }} | ||
fields: repo,action,workflow | ||
text: 'Release workflow failed in testing job' | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }} | ||
|
||
release: | ||
needs: [test-nodejs] | ||
name: Publish to any of NPM, Github, and Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -77,6 +27,8 @@ jobs: | |
git config --global core.eol lf | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
- name: Check if Node.js project and has package.json | ||
id: packagejson | ||
run: test -e ./package.json && echo "::set-output name=exists::true" || echo "::set-output name=exists::false" | ||
|
@@ -88,6 +40,14 @@ jobs: | |
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Install dependencies | ||
run: npm install | ||
- name: Check secrets | ||
run: | | ||
if [[ "${{ secrets.GH_TOKEN }}" == "" ]]; then | ||
echo "Secret is not available. Skipping..." | ||
exit 0 | ||
else | ||
echo "Secret is available." | ||
fi | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Publish to any of NPM, Github, and Docker Hub | ||
id: release | ||
|
@@ -96,10 +56,10 @@ jobs: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
GIT_AUTHOR_NAME: asyncapi-bot | ||
GIT_AUTHOR_EMAIL: [email protected] | ||
GIT_COMMITTER_NAME: asyncapi-bot | ||
GIT_COMMITTER_EMAIL: [email protected] | ||
GIT_AUTHOR_NAME: KhudaDad414 | ||
GIT_AUTHOR_EMAIL: [email protected] | ||
GIT_COMMITTER_NAME: KhudaDad414 | ||
GIT_COMMITTER_EMAIL: [email protected] | ||
run: npm run release | ||
- if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel | ||
name: Report workflow run status to Slack | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
# target branch of release. More info https://docs.github.com/en/rest/reference/repos#releases | ||
# in case release is created from release branch then we need to checkout from given branch | ||
|
@@ -26,17 +26,14 @@ jobs: | |
run: test -e ./package.json && echo "::set-output name=exists::true" || echo "::set-output name=exists::false" | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14 | ||
node-version: 18 | ||
cache: 'npm' | ||
cache-dependency-path: '**/package-lock.json' | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Install dependencies | ||
run: npm install | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Assets generation | ||
run: npm run generate:assets | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Bump version in package.json | ||
# There is no need to substract "v" from the tag as version script handles it | ||
|
@@ -49,8 +46,8 @@ jobs: | |
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
commit-message: 'chore(release): ${{github.event.release.tag_name}}' | ||
committer: asyncapi-bot <[email protected]> | ||
author: asyncapi-bot <[email protected]> | ||
committer: KhudaDad414 | ||
author: KhudaDad414 | ||
title: 'chore(release): ${{github.event.release.tag_name}}' | ||
body: 'Version bump in package.json for release [${{github.event.release.tag_name}}](${{github.event.release.html_url}})' | ||
branch: version-bump/${{github.event.release.tag_name}} | ||
|
@@ -62,4 +59,4 @@ jobs: | |
fields: repo,action,workflow | ||
text: 'Unable to bump the version in package.json after the release' | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check secrets | ||
run: | | ||
if [[ "${{ vars.GH_TOKEN }}" == "" ]]; then | ||
echo "Secret is not available. Skipping..." | ||
exit 0 | ||
else | ||
echo "Secret is available." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# Step 1: Get the value of $VERSION environment variable | ||
VERSION="$VERSION" | ||
|
||
# Step 2: Extract the package name and version | ||
PACKAGE_NAME="${VERSION%-v*}" | ||
PACKAGE_VERSION="${VERSION##*-}" | ||
|
||
# Step 3: Check if the package name matches '@khudadad414/studio-ui' | ||
if [ "$PACKAGE_NAME" = "@khudadad414/studio-ui" ]; then | ||
# Update the version of your npm package here | ||
npm --no-git-tag-version --allow-same-version version "$PACKAGE_VERSION" | ||
else | ||
echo "Version was not bumped because this release doesn't belong to this package." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# Step 1: Get the value of $VERSION environment variable | ||
VERSION="$VERSION" | ||
|
||
# Step 2: Extract the package name and version | ||
PACKAGE_NAME="${VERSION%-v*}" | ||
PACKAGE_VERSION="${VERSION##*-}" | ||
|
||
# Step 3: Check if the package name matches '@khudadad414/studio' or '@khudadad414/studio-ui' | ||
if [ "$PACKAGE_NAME" = "@khudadad414/studio" ]; then | ||
# Update the version of your npm package here | ||
npm --no-git-tag-version --allow-same-version version "$PACKAGE_VERSION" | ||
else | ||
echo "Version was not bumped because this release doesn't belong to this package." | ||
fi |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,9 @@ | |
"release": { | ||
"dependsOn": ["build"] | ||
}, | ||
"test": {} | ||
"test": {}, | ||
"bump:version": { | ||
"cache": false | ||
} | ||
} | ||
} |