-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Showing
2 changed files
with
53 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,6 +100,56 @@ jobs: | |
uses: ./.github/workflows/reusable-build.yml | ||
secrets: inherit | ||
|
||
publish-beta: | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Setup dependencies, cache and install | ||
uses: ./.github/actions/install | ||
|
||
- uses: jwalton/gh-find-current-pr@master | ||
id: pr-number | ||
|
||
- name: Set beta channel value | ||
run: | | ||
echo "BETA_CHANNEL=beta-${{ steps.pr-number.outputs.pr }}" >> "$GITHUB_ENV" | ||
- name: Setup Vals | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "$BETA_CHANNEL" | ||
- name: Publish $BETA_CHANNEL channel | ||
run: | | ||
CURRENT_VERSION=$(cat package.json | jq -r '.version') | ||
BETA_TAG=$BETA_CHANNEL-${{ github.run_id }}-${{github.run_attempt}} | ||
npm version "$CURRENT_VERSION-$BETA_TAG" | ||
yarn npm publish --access public --tag $BETA_CHANNEL | ||
env: | ||
YARN_NPM_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
|
||
- name: Write a comment that will be deleted at the end of the job | ||
uses: thollander/actions-comment-pull-request@v2 | ||
with: | ||
message: | | ||
Published under this [`$BETA_CHANNEL`](https://www.npmjs.com/package/sfdx-git-delta/v/$BETA_CHANNEL) channel. | ||
To install it: | ||
```sh | ||
$ sfdx plugins:install sfdx-git-delta@$BETA_CHANNEL | ||
``` | ||
Happy QA! | ||
comment_tag: beta-publish | ||
mode: recreate | ||
|
||
e2e-check: | ||
needs: [build] | ||
strategy: | ||
|