-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: Release NPM for PR #207
Merged
Merged
Changes from 14 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
e0db56f
feature: Release NPM for PR
kevinshahfws 5aa843c
feature: Release NPM for PR
kevinshahfws 0803f43
Added branch name in .releaserc
kevinshahfws 4648073
Added branch name in .releaserc
kevinshahfws 66dd0a4
Added branch name in .releaserc
kevinshahfws a49dfbb
Added branch name in .releaserc
kevinshahfws c902f2e
Added branch name in .releaserc
kevinshahfws e9bdd7d
Removed pr-channel reference
kevinshahfws 95e65a0
Removed pr-channel reference
kevinshahfws 007209f
npm version command
kevinshahfws 10e60dd
npm version command
kevinshahfws df674ef
npm version command
kevinshahfws 35d8543
npm version command
kevinshahfws e039134
npm version command
kevinshahfws 1fd99b5
Updated if condition for release npm
kevinshahfws 64a79df
Updated if condition for build artifact
kevinshahfws 1508ff2
Updated channel name to replace with -
kevinshahfws 8db8fec
Updated channel name to replace with -
kevinshahfws d475606
Updated release name for PR
kevinshahfws ec65124
Debug for prerelease
kevinshahfws 59e82f6
PR deploy
kpears201 e8cee5a
PR deploy
kpears201 d449196
PR deploy
kpears201 1737f38
PR deploy
kpears201 e630716
PR deploy
kpears201 442b9e3
PR deploy
kpears201 1da0c00
PR deploy
kpears201 dd46914
PR deploy
kpears201 9d4ad3a
PR deploy
kpears201 917d5c5
PR deploy
kpears201 d7e0b68
PR deploy
kpears201 b37342d
PR deploy
kpears201 f0d954b
PR deploy
kpears201 261c28b
PR deploy
kpears201 678102e
PR deploy
kpears201 d5072e6
PR deploy
kpears201 fc478c0
PR deploy
kpears201 4e93b24
PR deploy
kpears201 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -12,6 +12,7 @@ on: | |
branches: | ||
- 'next' | ||
- 'proposed' | ||
|
||
env: | ||
HUSKY: 0 | ||
jobs: | ||
|
@@ -69,18 +70,25 @@ jobs: | |
run: npx semantic-release --dry-run | ||
- name: Build artifacts for PRs | ||
if: github.event_name == 'pull_request' | ||
run: npm run dist | ||
run: | | ||
npm version prerelease --preid pr207 --workspaces --git-tag-version false | ||
npm version prerelease --preid pr207 --workspaces --include-workspace-root --git-tag-version false | ||
npm run dist | ||
- name: Check if semantic-release created a build | ||
id: check_build | ||
uses: andstor/file-existence-action@v2 | ||
with: | ||
files: "./src/sdks/core/dist/lib/firebolt.mjs" | ||
- name: Release Firebolt SDKs to NPM | ||
if: steps.check_build.outputs.files_exists == 'true' && github.event_name != 'pull_request' && (github.ref_name != 'main' || github.event_name == 'workflow_dispatch') | ||
#if: steps.check_build.outputs.files_exists == 'true' && github.event_name != 'pull_request' && (github.ref_name != 'main' || github.event_name == 'workflow_dispatch') | ||
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 | ||
run: | | ||
echo "NPM DIST TAG ::: " ${{ env.NPM_DIST_TAG }} | ||
echo "Release Channel ::: " $RELEASE_CHANNEL | ||
npm publish --tag $RELEASE_CHANNEL --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: | ||
|
@@ -96,7 +104,7 @@ jobs: | |
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.event.pull_request.head.repo.full_name == 'rdkcentral/firebolt-apis') | ||
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. | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need this twice now, --include-workspace-root fixes that