forked from BitGo/BitGoJS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(root): add alpha release workflow
Ticket: BG-60558
- Loading branch information
Showing
4 changed files
with
83 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# @see beta-publish.yml | ||
# The same workflow as the above except some input args. Replicated for separation of concerns | ||
name: Alpha Release for Development | ||
on: | ||
workflow_dispatch: | ||
# push: | ||
# branches: | ||
# - master | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
publish: | ||
name: Publish Alpha Release | ||
runs-on: ubuntu-latest | ||
if: github.ref != 'refs/heads/master' # only publish changes if on feature branches | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14 | ||
|
||
- name: Install BitGoJS | ||
run: yarn install --with-frozen-lockfile | ||
|
||
- name: Configure Git & NPM | ||
run: | | ||
git config --global user.name 'Git bot' | ||
git config --global user.email '[email protected]' | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | ||
git checkout -b alpha-$(git rev-parse --short HEAD) | ||
echo "email=${{ secrets.BETA_EMAIL }}" > .npmrc | ||
echo "@bitgo-beta:registry=https://registry.npmjs.org" >> .npmrc | ||
echo "//registry.npmjs.org/:_authToken=${{ secrets.BETA_TOKEN }}" >> .npmrc | ||
echo "//registry.npmjs.org/:always-auth=true" >> .npmrc | ||
- name: Prepare Alpha | ||
run: | | ||
rm -rfd ./modules/web-demo | ||
rm -rfd ./modules/express | ||
npx ts-node ./scripts/prepare-release.ts alpha | ||
- name: Rebuild Alpha | ||
run: yarn | ||
|
||
- name: Commit Local Changes | ||
run: git commit -am "Auto updated alpha branch" --no-verify || echo "No changes to commit" | ||
|
||
- name: Lerna Publish | ||
run: yarn lerna publish from-package --preid alpha --dist-tag alpha --force-publish --yes --loglevel silly | ||
|
||
- name: Verify Publish | ||
run: npx ts-node ./scripts/verify-release.ts alpha |
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 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