Skip to content

Commit

Permalink
Merge branch 'next' into featuer/play-intent
Browse files Browse the repository at this point in the history
  • Loading branch information
jlacivita committed Dec 4, 2023
2 parents 9668729 + 1f33006 commit 5d993c1
Show file tree
Hide file tree
Showing 15 changed files with 1,400 additions and 13,132 deletions.
61 changes: 32 additions & 29 deletions .github/workflows/release-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,41 +35,45 @@ jobs:
run: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc'
- name: Install dependencies
run: npm ci
- name: Set explicit npm dist-tag default
if: github.ref_name == 'main'
- name: Set main tags
if: github.ref_name == 'main' && github.event_name != 'pull_request'
run: |
echo "NPM_DIST_TAG=latest" >> $GITHUB_ENV
echo "RELEASE_CHANNEL=latest" >> $GITHUB_ENV
- name: Override npm dist-tag for non-main releases
if: github.ref_name != 'main'
echo "DOCS_TAG=latest" >> $GITHUB_ENV
- name: Set next tags
if: github.ref_name == 'next' && github.event_name != 'pull_request'
run: |
echo "Setting NPM_DIST_TAG to '${{ github.ref_name }}'"
echo "NPM_DIST_TAG=${{ github.ref_name }}" >> $GITHUB_ENV
- name: Override release channel for non-main releases
if: github.ref_name != 'main'
echo "NPM_DIST_TAG=next" >> $GITHUB_ENV
echo "DOCS_TAG=next" >> $GITHUB_ENV
- name: Set feature branch tags
if: github.ref_name != 'main' && github.ref_name != 'next' && github.event_name != 'pull_request'
run: |
echo "Setting RELEASE_CHANNEL to '$(node ./src/js/version.mjs channel $NPM_DIST_TAG)' using branch name '$NPM_DIST_TAG'"
echo "RELEASE_CHANNEL=$(node ./src/js/version.mjs channel $NPM_DIST_TAG)" >> $GITHUB_ENV
- name: Override release channel for PRs
if: github.event_name == 'pull_request'
echo "NPM_DIST_TAG=test" >> $GITHUB_ENV
echo "FEATURE_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
- name: Set PR tags
if: github.ref_name != 'main' && github.ref_name != 'next' && github.event_name == 'pull_request'
run: |
echo "Setting RELEASE_CHANNEL to 'pr${{ github.event.number }}'"
echo "RELEASE_CHANNEL=pr${{ github.event.number }}" >> $GITHUB_ENV
echo "NPM_DIST_TAG=test" >> $GITHUB_ENV
echo "DOCS_TAG=pr-$(node ./src/js/version.mjs branch-to-prerelease ${{ github.head_ref }})" >> $GITHUB_ENV
echo "FEATURE_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV
- name: Release mono-artifact to GitHub
if: (github.ref_name != 'main' && github.event_name != 'pull_request') || github.event_name == 'workflow_dispatch'
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_PAT }} # <-- Allows semantic-release-bot to push changes to protected branches
npm_config_tag: ${{ env.NPM_DIST_TAG }} # <-- For main, this is `latest.` Otherwise, `next`, `next-major`, etc. See ./.releaserc for release branch config.
run: npx semantic-release
- name: Dry-run mono-artifact
if: (github.ref_name == 'main' && github.event_name != 'workflow_dispatch') || github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_PAT }} # <-- Allows semantic-release-bot to push changes to protected branches
npm_config_tag: ${{ env.NPM_DIST_TAG }} # <-- For main, this is `latest.` Otherwise, `next`, `next-major`, etc. See ./.releaserc for release branch config.
run: npx semantic-release --dry-run
- name: Build artifacts for PRs
if: github.event_name == 'pull_request'
run: npm run dist
- name: Build artifacts for feature branches
if: github.ref_name != 'main' && github.ref_name != 'next'
run: |
PRERELEASE=$(node ./src/js/version.mjs branch-to-prerelease $FEATURE_BRANCH)
node ./src/js/version.mjs latest-prerelease $PRERELEASE
npm version prerelease --preid $PRERELEASE --git-tag-version false
npm version prerelease --preid $PRERELEASE --workspaces --git-tag-version false
npm run dist
- name: Check if semantic-release created a build
id: check_build
uses: andstor/file-existence-action@v2
Expand All @@ -79,32 +83,31 @@ jobs:
if: steps.check_build.outputs.files_exists == 'true' && github.event_name != 'pull_request' && (github.ref_name != 'main' || github.event_name == 'workflow_dispatch')
env:
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} # <-- Allows semantic-release to publish to npm without 2 factor auth.
npm_config_tag: ${{ env.NPM_DIST_TAG }} # <-- For main, this is `latest.` Otherwise, `next`, `next-major`, etc. See ./.releaserc for release branch config.
run: npm publish --tag $RELEASE_CHANNEL --workspaces
run: |
npm --version
echo "NPM DIST TAG :: " $NPM_DIST_TAG
npm publish --tag $NPM_DIST_TAG --workspaces
- name: Dry-run Firebolt SDKs to NPM
if: steps.check_build.outputs.files_exists == 'true' && (github.ref_name == 'main' && github.event_name != 'workflow_dispatch')
env:
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} # <-- Allows semantic-release to publish to npm without 2 factor auth.
npm_config_tag: ${{ env.NPM_DIST_TAG }} # <-- For main, this is `latest.` Otherwise, `next`, `next-major`, etc. See ./.releaserc for release branch config.
run: npm publish --tag $RELEASE_CHANNEL --workspaces --dry-run
run: npm publish --tag $NPM_DIST_TAG --workspaces --dry-run
- name: Checkout firebolt GitHub.io repository
if: steps.check_build.outputs.files_exists == 'true'
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_PAT }} # <-- Allows semantic-release-bot to push changes to protected branches
npm_config_tag: ${{ env.NPM_DIST_TAG }} # <-- For main, this is `latest.` Otherwise, `next`, `next-major`, etc. See ./.releaserc for release branch config.
run: |
cd /tmp
git clone https://rdkcentral:[email protected]/rdkcentral/firebolt.git ./firebolt-docs
- name: Release docs to GitHub.io
if: steps.check_build.outputs.files_exists == 'true'
if: steps.check_build.outputs.files_exists == 'true' && (github.ref_name == 'main' || github.ref_name == 'next' || github.event_name == 'pull_request')
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_PAT }} # <-- Allows semantic-release-bot to push changes to protected branches
npm_config_tag: ${{ env.NPM_DIST_TAG }} # <-- For main, this is `latest.` Otherwise, `next`, `next-major`, etc. See ./.releaserc for release branch config.
run: |
npm run publish:docs /tmp/firebolt-docs $RELEASE_CHANNEL
npm run publish:docs /tmp/firebolt-docs $DOCS_TAG
cd /tmp/firebolt-docs
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git add --all
git diff-index --quiet HEAD || git commit -m "chore: Publish $RELEASE_CHANNEL"
git diff-index --quiet HEAD || git commit -m "chore: Publish $DOCS_TAG"
git push
4 changes: 4 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"semi": false,
"singleQuote": true
}
66 changes: 66 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,69 @@
# [1.0.0](https://github.com/rdkcentral/firebolt-apis/compare/v0.17.1...v1.0.0) (2023-11-03)


### Bug Fixes

* Account.session params to be mandatory ([#196](https://github.com/rdkcentral/firebolt-apis/issues/196)) ([fc5c638](https://github.com/rdkcentral/firebolt-apis/commit/fc5c63886d9b4eb30b32c1edc75f0f6afe80a827))
* CI looking for legacy 0.x version ([923d02a](https://github.com/rdkcentral/firebolt-apis/commit/923d02ae96716a5272c5507e864f366012824642))
* Permission schema with Capability as required ([74d9de9](https://github.com/rdkcentral/firebolt-apis/commit/74d9de9b125baffb415e11ba3888c1c464cf5b12))
* Provider error ([#202](https://github.com/rdkcentral/firebolt-apis/issues/202)) ([4666a5e](https://github.com/rdkcentral/firebolt-apis/commit/4666a5ee56846f14dd1ba79dab82891505b5a2ec))
* schemas version upgraded to 2.0.0-next.1 ([#199](https://github.com/rdkcentral/firebolt-apis/issues/199)) ([b0fb8cf](https://github.com/rdkcentral/firebolt-apis/commit/b0fb8cfbda6bbef055000dc9911f344ab9ee8771))
* Update schemas & 1.0.0 version! ([#200](https://github.com/rdkcentral/firebolt-apis/issues/200)) ([ea29f33](https://github.com/rdkcentral/firebolt-apis/commit/ea29f3323a22ffa36904bdc6cf6e76a31fa8cb76))
* Updated Discovery.launch example with xrn:firebolt:application-type ([#187](https://github.com/rdkcentral/firebolt-apis/issues/187)) ([4dbbab3](https://github.com/rdkcentral/firebolt-apis/commit/4dbbab3d9fa68c0e5185ca72fd0170bae8a30139))
* Updated metrics:distributor capability to could ([#185](https://github.com/rdkcentral/firebolt-apis/issues/185)) ([9ca2206](https://github.com/rdkcentral/firebolt-apis/commit/9ca2206a2dca7149dcf93df3d303806d136785ed))


### Features

* Added optional parameter 'force' in usergrants.request ([#186](https://github.com/rdkcentral/firebolt-apis/issues/186)) ([31801ca](https://github.com/rdkcentral/firebolt-apis/commit/31801caec6bea0e8b295ea6a9ec54ca1d8e08d16))
* Play Intent ([#151](https://github.com/rdkcentral/firebolt-apis/issues/151)) ([d1ddf3f](https://github.com/rdkcentral/firebolt-apis/commit/d1ddf3fb3b1f758315686ad2f6dc57c2b270f33a))


### BREAKING CHANGES

* This is not really a breaking change, but 1.0 release!!!

# [1.0.0-next.2](https://github.com/rdkcentral/firebolt-apis/compare/v1.0.0-next.1...v1.0.0-next.2) (2023-11-01)


### Bug Fixes

* Provider error ([#202](https://github.com/rdkcentral/firebolt-apis/issues/202)) ([4666a5e](https://github.com/rdkcentral/firebolt-apis/commit/4666a5ee56846f14dd1ba79dab82891505b5a2ec))

# [1.0.0-next.1](https://github.com/rdkcentral/firebolt-apis/compare/v0.18.0-next.7...v1.0.0-next.1) (2023-11-01)


### Bug Fixes

* CI looking for legacy 0.x version ([923d02a](https://github.com/rdkcentral/firebolt-apis/commit/923d02ae96716a5272c5507e864f366012824642))
* Update schemas & 1.0.0 version! ([#200](https://github.com/rdkcentral/firebolt-apis/issues/200)) ([ea29f33](https://github.com/rdkcentral/firebolt-apis/commit/ea29f3323a22ffa36904bdc6cf6e76a31fa8cb76))


### BREAKING CHANGES

* This is not really a breaking change, but 1.0 release!!!

# [0.18.0-next.7](https://github.com/rdkcentral/firebolt-apis/compare/v0.18.0-next.6...v0.18.0-next.7) (2023-10-30)


### Bug Fixes

* schemas version upgraded to 2.0.0-next.1 ([#199](https://github.com/rdkcentral/firebolt-apis/issues/199)) ([b0fb8cf](https://github.com/rdkcentral/firebolt-apis/commit/b0fb8cfbda6bbef055000dc9911f344ab9ee8771))

# [0.18.0-next.6](https://github.com/rdkcentral/firebolt-apis/compare/v0.18.0-next.5...v0.18.0-next.6) (2023-10-30)


### Bug Fixes

* Permission schema with Capability as required ([74d9de9](https://github.com/rdkcentral/firebolt-apis/commit/74d9de9b125baffb415e11ba3888c1c464cf5b12))

# [0.18.0-next.5](https://github.com/rdkcentral/firebolt-apis/compare/v0.18.0-next.4...v0.18.0-next.5) (2023-10-27)


### Features

* Play Intent ([#151](https://github.com/rdkcentral/firebolt-apis/issues/151)) ([d1ddf3f](https://github.com/rdkcentral/firebolt-apis/commit/d1ddf3fb3b1f758315686ad2f6dc57c2b270f33a))

# [0.18.0-next.4](https://github.com/rdkcentral/firebolt-apis/compare/v0.18.0-next.3...v0.18.0-next.4) (2023-10-24)


Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ title: Firebolt APIs
# Firebolt APIs
Firebolt APIs are defined by [OpenRPC schemas](https://spec.open-rpc.org).

The schemas are used to generate SDK and Documentation artifacts.
The schemas are used to generate SDK and Documentation artifacts.
Loading

0 comments on commit 5d993c1

Please sign in to comment.