-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publishable NPM packages for mainnet (#8360)
- Loading branch information
Showing
54 changed files
with
566 additions
and
430 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 |
---|---|---|
|
@@ -6,7 +6,8 @@ on: | |
branches: | ||
# $default-branch | ||
- master | ||
- release-pismo | ||
- 'release-*' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
|
@@ -54,14 +55,22 @@ jobs: | |
run: npm whoami | ||
- name: publish to NPM tag | ||
run: | | ||
if [ "${{ github.ref_name }}" = "release-pismo" ]; then | ||
# A pismo dev release. | ||
TAG=pismo-dev | ||
else | ||
# Just a dev release. | ||
TAG=dev | ||
fi | ||
yarn lerna publish --conventional-prerelease --canary --exact \ | ||
case $GITHUB_REF_NAME in | ||
release-*) | ||
# A pre-release. | ||
TAG=${GITHUB_REF_NAME#release-}-dev | ||
;; | ||
master) | ||
# A trunk dev release. | ||
TAG=dev | ||
;; | ||
*) | ||
# Some other dev release. | ||
TAG=other-dev | ||
;; | ||
esac | ||
# without concurrency until https://github.com/Agoric/agoric-sdk/issues/8091 | ||
yarn lerna publish --concurrency 1 --conventional-prerelease --canary --exact \ | ||
--dist-tag=$TAG --preid=$TAG-$(git rev-parse --short=7 HEAD) \ | ||
--no-push --no-verify-access --yes | ||
- name: notify on failure | ||
|
@@ -101,7 +110,7 @@ jobs: | |
- uses: nwtgck/[email protected] | ||
with: | ||
# Production deployment if a push or merged PR. | ||
production-deploy: ${{github.event_name == 'push'}} | ||
production-deploy: ${{ github.event_name == 'push' && github.ref_name == 'master' }} | ||
publish-dir: coverage/html | ||
# SECURITY: we don't want to hand out the Github token to this action. | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ on: | |
branches: | ||
# $default-branch | ||
- master | ||
- release-pismo | ||
- 'release-*' | ||
|
||
jobs: | ||
xs-build: | ||
|
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ on: | |
push: | ||
branches: | ||
- master | ||
- release-pismo | ||
- 'release-*' | ||
- beta | ||
tags: | ||
- '@agoric/sdk@*' | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,10 @@ on: | |
push: | ||
branches: | ||
- master | ||
- release-pismo | ||
- 'release-*' | ||
- beta | ||
tags: | ||
- '@agoric/sdk@*' | ||
pull_request: | ||
types: | ||
- opened | ||
|
@@ -28,10 +30,10 @@ jobs: | |
if: needs.pre_check.outputs.should_run == 'true' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# FIXME: Use this to enable NPM deploys... | ||
# cli: [link-cli, local-npm] | ||
cli: [link-cli] | ||
cli: [link-cli/yarn, registry/yarn, registry/npm, registry/npx] | ||
timeout-minutes: 40 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
|
@@ -41,17 +43,10 @@ jobs: | |
shell: bash | ||
|
||
# Prerequisites | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
- name: cache node modules | ||
uses: actions/cache@v3 | ||
- uses: ./.github/actions/restore-node | ||
with: | ||
path: ~/.cache/yarn | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
node-version: 16.x | ||
keep-endo: 'true' | ||
|
||
# Select a branch on dapp to test against by adding text to the body of the | ||
# pull request. For example: #dapp-encouragement-branch: zoe-release-0.7.0 | ||
|
@@ -74,53 +69,16 @@ jobs: | |
console.log(branch); | ||
return branch; | ||
# 'yarn install' must be done at the top level, to build all the | ||
# cross-package symlinks | ||
- run: yarn install --frozen-lockfile | ||
- run: yarn build | ||
|
||
- name: Link Agoric CLI from SDK | ||
if: ${{ matrix.cli == 'link-cli' }} | ||
run: | | ||
yarn link-cli "$HOME/bin/agoric" | ||
echo "AGORIC_CMD=[\"$HOME/bin/agoric\"]" >> $GITHUB_ENV | ||
- name: Start local NPM registry | ||
if: ${{ matrix.cli == 'local-npm' }} | ||
if: ${{ startsWith(matrix.cli, 'registry') }} | ||
run: | | ||
tmp_registry_log=`mktemp` | ||
nohup npx verdaccio@^5.4.0 &>$tmp_registry_log & | ||
# Wait for `verdaccio` to boot | ||
grep -q 'http address' <(tail -f $tmp_registry_log) | ||
# Set registry to local registry | ||
npm set registry http://localhost:4873 | ||
yarn config set registry http://localhost:4873 | ||
# Login so we can publish packages | ||
npx npm-cli-login@^1.0.0 -u user -p password -e [email protected] \ | ||
-r http://localhost:4873 --quotes | ||
npm whoami | ||
yarn lerna publish --conventional-prerelease --canary --exact \ | ||
--dist-tag=blah --preid=dev-$(git rev-parse --short=7 HEAD) \ | ||
--no-push --no-verify-access --yes | ||
yarn global add agoric@blah </dev/null | ||
# Use the locally-installed dist-tag. | ||
echo 'AGORIC_INSTALL_OPTIONS=["blah"]' >> $GITHUB_ENV | ||
echo 'AGORIC_START_OPTIONS=["--rebuild"]' >> $GITHUB_ENV | ||
echo 'AGORIC_CMD=["agoric"]' >> $GITHUB_ENV | ||
set -xe | ||
git reset --hard HEAD | ||
git config user.email "[email protected]" | ||
REGISTRY_PUBLISH_WORKSPACES="$HOME/endo" scripts/registry.sh bg-publish ${{ matrix.cli }} | ||
- name: run agoric-cli integration-test | ||
working-directory: ./packages/agoric-cli | ||
run: yarn integration-test | ||
env: | ||
AGORIC_INIT_OPTIONS: '["--dapp-branch=${{steps.get-branch.outputs.result}}"]' | ||
# Try to avoid hitting a pessimal Actions output rate-limitation. | ||
SOLO_MAX_DEBUG_LENGTH: '1024' | ||
run: scripts/registry.sh test ${{ matrix.cli }} ${{steps.get-branch.outputs.result}} | ||
|
||
- name: notify on failure | ||
if: > | ||
|
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
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
"type": "module", | ||
"packageManager": "[email protected]", | ||
"devDependencies": { | ||
"@endo/eslint-plugin": "^0.4.3", | ||
"@endo/eslint-plugin": "0.4.3", | ||
"@jessie.js/eslint-plugin": "^0.3.0", | ||
"@types/node": "^16.13.0", | ||
"@typescript-eslint/parser": "^5.55.0", | ||
|
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
Oops, something went wrong.