-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9082084
commit 13494b7
Showing
23 changed files
with
3,301 additions
and
2,666 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
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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,35 @@ | ||
name: Release | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
inputs: | ||
dry_run: | ||
description: Run package release in "dry run" mode (does not publish) | ||
default: false | ||
type: boolean | ||
|
||
jobs: | ||
Release: | ||
name: 🚀 Release | ||
if: github.event.pull_request.merged && startsWith(github.head_ref, 'release-') | ||
package_release: | ||
name: Release from "${{ github.ref_name }}" branch | ||
runs-on: ubuntu-latest | ||
# GH does not allow to limit branches in the workflow_dispatch settings so this here is a safety measure | ||
if: ${{ inputs.dry_run || startsWith(github.ref_name, 'release') || startsWith(github.ref_name, 'master') }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/github-script@v6 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
script: | | ||
const get_change_log_diff = require('./scripts/get_changelog_diff.js') | ||
core.exportVariable('CHANGELOG', get_change_log_diff()) | ||
// Getting the release version from the PR source branch | ||
// Source branch looks like this: release-1.0.0 | ||
const version = context.payload.pull_request.head.ref.split('-')[1] | ||
core.exportVariable('VERSION', version) | ||
- uses: ./.github/actions/setup-node | ||
|
||
- name: Publish package | ||
run: npm publish | ||
node-version: 22 | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Release | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Create release on GitHub | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
body: ${{ env.CHANGELOG }} | ||
tag: ${{ env.VERSION }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
# https://github.com/stream-ci-bot | ||
GH_TOKEN: ${{ secrets.DOCUSAURUS_GH_TOKEN }} | ||
HUSKY: 0 | ||
run: > | ||
yarn semantic-release | ||
${{ inputs.dry_run && '--dry-run' || '' }} |
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,7 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/mocharc", | ||
"bail": true, | ||
"exit": true, | ||
"timeout": 20000, | ||
"require": ["ts-node/register"] | ||
} |
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 @@ | ||
22 |
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,81 @@ | ||
{ | ||
"branches": [ | ||
{ | ||
"name": "master", | ||
"channel": "latest" | ||
}, | ||
{ | ||
"name": "release-v8", | ||
"channel": "v8", | ||
"range": "8.x" | ||
} | ||
], | ||
"plugins": [ | ||
[ | ||
"@semantic-release/commit-analyzer", | ||
{ | ||
"preset": "angular", | ||
"releaseRules": [ | ||
{ "type": "chore", "scope": "deps", "release": "patch" }, | ||
{ "type": "refactor", "release": "patch" } | ||
] | ||
} | ||
], | ||
[ | ||
"@semantic-release/release-notes-generator", | ||
{ | ||
"preset": "conventionalcommits", | ||
"presetConfig": { | ||
"types": [ | ||
{ | ||
"type": "fix", | ||
"section": "Bug Fixes", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "feat", | ||
"section": "Features", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "chore", | ||
"scope": "deps", | ||
"section": "Chores", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "refactor", | ||
"section": "Refactors", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "perf", | ||
"section": "Performance Improvements", | ||
"hidden": false | ||
} | ||
] | ||
} | ||
} | ||
], | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"prepareCmd": "NEXT_VERSION=${nextRelease.version} npm run build" | ||
} | ||
], | ||
[ | ||
"@semantic-release/changelog", | ||
{ | ||
"changelogFile": "./CHANGELOG.md" | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": ["./CHANGELOG.md"] | ||
} | ||
], | ||
"@semantic-release/github", | ||
"@semantic-release/npm" | ||
] | ||
} |
Oops, something went wrong.