-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into kamil1094-rule_validation_fix
- Loading branch information
Showing
30 changed files
with
6,016 additions
and
24,524 deletions.
There are no files selected for viewing
File renamed without changes.
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,134 @@ | ||
# This action is centrally managed in https://github.com/asyncapi/.github/ | ||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo | ||
|
||
# It does magic only if there is package.json file in the root of the project | ||
name: Release - if Node project | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
# below lines are not enough to have release supported for these branches | ||
# make sure configuration of `semantic-release` package mentions these branches | ||
- next-spec | ||
- next-major | ||
- next-major-spec | ||
- beta | ||
- alpha | ||
- next | ||
|
||
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.repository, 'asyncapi/' ) && | ||
(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: | ||
# Using macos-13 instead of latest (macos-14) due to an issue with Puppeteer and such runner. | ||
# See: https://github.com/puppeteer/puppeteer/issues/12327 and https://github.com/asyncapi/parser-js/issues/1001 | ||
os: [ubuntu-latest, macos-13, 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 | ||
shell: bash | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Check if Node.js project and has package.json | ||
id: packagejson | ||
run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT | ||
shell: bash | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Check package-lock version | ||
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master | ||
id: lockversion | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "${{ steps.lockversion.outputs.version }}" | ||
- if: steps.lockversion.outputs.version == '18' && matrix.os == 'windows-latest' | ||
name: Install npm cli 8 | ||
shell: bash | ||
#npm cli 10 is buggy because of some cache issues | ||
run: npm install -g npm@8.19.4 | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Install dependencies | ||
shell: bash | ||
run: npm ci | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Run test | ||
run: npm test --if-present | ||
- 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, or Docker Hub | ||
runs-on: ubuntu-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@v4 | ||
- name: Check if Node.js project and has package.json | ||
id: packagejson | ||
run: test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT | ||
shell: bash | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Check package-lock version | ||
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master | ||
id: lockversion | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "${{ steps.lockversion.outputs.version }}" | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Install dependencies | ||
shell: bash | ||
run: npm ci | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Add plugin for conventional commits for semantic-release | ||
run: npm install --save-dev conventional-changelog-conventionalcommits@5.0.0 | ||
- if: steps.packagejson.outputs.exists == 'true' | ||
name: Publish to any of NPM, Github, and Docker Hub | ||
id: release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
GIT_AUTHOR_NAME: asyncapi-bot | ||
GIT_AUTHOR_EMAIL: info@asyncapi.io | ||
GIT_COMMITTER_NAME: asyncapi-bot | ||
GIT_COMMITTER_EMAIL: info@asyncapi.io | ||
run: npx semantic-release@19.0.4 | ||
- 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 release job' | ||
env: | ||
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
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,28 @@ | ||
# This action is centrally managed in https://github.com/asyncapi/.github/ | ||
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo | ||
|
||
name: Trigger MAINTAINERS.yaml file update | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
paths: | ||
# Check all valid CODEOWNERS locations: | ||
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-file-location | ||
- 'CODEOWNERS' | ||
- '.github/CODEOWNERS' | ||
- '.docs/CODEOWNERS' | ||
|
||
jobs: | ||
trigger-maintainers-update: | ||
name: Trigger updating MAINTAINERS.yaml because of CODEOWNERS change | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Repository Dispatch | ||
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # https://github.com/peter-evans/repository-dispatch/releases/tag/v3.0.0 | ||
with: | ||
# The PAT with the 'public_repo' scope is required | ||
token: ${{ secrets.GH_TOKEN }} | ||
repository: ${{ github.repository_owner }}/community | ||
event-type: trigger-maintainers-update |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
node_modules | ||
.vscode | ||
.DS_Store | ||
/docs/api.md | ||
/docs | ||
/coverage | ||
/lib | ||
/esm | ||
|
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 @@ | ||
--- | ||
branches: | ||
- master | ||
# by default release workflow reacts on push not only to master. | ||
#This is why out of the box sematic release is configured for all these branches | ||
- name: next-spec | ||
prerelease: true | ||
- name: next-major | ||
prerelease: true | ||
- name: next-major-spec | ||
prerelease: true | ||
- name: beta | ||
prerelease: true | ||
- name: alpha | ||
prerelease: true | ||
- name: next | ||
prerelease: true | ||
plugins: | ||
- - "@semantic-release/commit-analyzer" | ||
- preset: conventionalcommits | ||
- - "@semantic-release/release-notes-generator" | ||
- preset: conventionalcommits | ||
- "@semantic-release/npm" | ||
- "@semantic-release/github" |
File renamed without changes.
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
Oops, something went wrong.