fix: alpha/beta/release
This commit is contained in:
parent
33e40f3471
commit
4d3cfa4019
46
.github/workflows/beta-publish.yml
vendored
Normal file
46
.github/workflows/beta-publish.yml
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: beta - Build and Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- name: Build and WNS publish
|
||||
run: |
|
||||
git config --global user.email "npm@dxos.org"
|
||||
git config --global user.name "DXOS"
|
||||
|
||||
yarn install
|
||||
yarn build
|
||||
yarn test
|
||||
yarn lint
|
||||
|
||||
# Uncomment for NPM publishing.
|
||||
VERSION=`cat lerna.json | grep '"version":' | awk '{ print $2 }' | sed 's/[",]//g'`
|
||||
yarn lerna version $VERSION --no-git-tag-version -y
|
||||
git commit -am "v$VERSION"
|
||||
git push
|
||||
git tag -f "v$VERSION"
|
||||
git push --tags -f
|
||||
yarn lerna publish from-package --force-publish -y
|
||||
|
||||
# Publish to WNS
|
||||
yarn wire profile init --name $WIRE_PROFILE --template-url https://apollo1.kube.moon.dxos.network/dxos/ipfs/gateway/QmcVUWB3a5JAhc8nJD1UYoWpkPXiqpuXWCBzemyBvzUCXD
|
||||
export PKG_CHANNEL="@beta"
|
||||
scripts/deploy_apps_to_wns.sh
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
||||
WIRE_WNS_USER_KEY: ${{secrets.wns_user_key}}
|
||||
WIRE_WNS_BOND_ID: ${{secrets.wns_bond_id}}
|
||||
WIRE_PROFILE: ci
|
@ -1,7 +1,7 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: Build and Publish
|
||||
name: alpha - Build and Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
@ -18,7 +18,7 @@ jobs:
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- name: Build and WNS publish
|
||||
run: |
|
||||
git config --global user.email "npm@dxos.network"
|
||||
git config --global user.email "npm@dxos.org"
|
||||
git config --global user.name "DXOS"
|
||||
|
||||
yarn install
|
||||
@ -28,10 +28,11 @@ jobs:
|
||||
|
||||
# Uncomment for NPM publishing.
|
||||
npm whoami
|
||||
yarn lerna publish -y prerelease --dist-tag="beta" --force-publish
|
||||
yarn lerna publish -y prerelease --dist-tag="alpha" --force-publish
|
||||
|
||||
# Publish to WNS
|
||||
yarn wire profile init --name $WIRE_PROFILE --template-url https://apollo1.kube.moon.dxos.network/dxos/ipfs/gateway/QmcVUWB3a5JAhc8nJD1UYoWpkPXiqpuXWCBzemyBvzUCXD
|
||||
export PKG_CHANNEL="@alpha"
|
||||
scripts/deploy_apps_to_wns.sh
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
45
.github/workflows/release-publish.yml
vendored
Normal file
45
.github/workflows/release-publish.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: release - Build and Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ release ]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- name: Build and WNS publish
|
||||
run: |
|
||||
git config --global user.email "npm@dxos.org"
|
||||
git config --global user.name "DXOS"
|
||||
|
||||
yarn install
|
||||
yarn build
|
||||
yarn test
|
||||
yarn lint
|
||||
|
||||
# Uncomment for NPM publishing.
|
||||
VERSION=`cat lerna.json | grep '"version":' | awk '{ print $2 }' | sed 's/[",]//g'`
|
||||
yarn lerna version $VERSION --no-git-tag-version -y
|
||||
git commit -am "v$VERSION"
|
||||
git push
|
||||
git tag -f "v$VERSION"
|
||||
git push --tags -f
|
||||
yarn lerna publish from-package --force-publish -y
|
||||
|
||||
# Publish to WNS
|
||||
yarn wire profile init --name $WIRE_PROFILE --template-url https://apollo1.kube.moon.dxos.network/dxos/ipfs/gateway/QmcVUWB3a5JAhc8nJD1UYoWpkPXiqpuXWCBzemyBvzUCXD
|
||||
scripts/deploy_apps_to_wns.sh
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
||||
WIRE_WNS_USER_KEY: ${{secrets.wns_user_key}}
|
||||
WIRE_WNS_BOND_ID: ${{secrets.wns_bond_id}}
|
||||
WIRE_PROFILE: ci
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.1.0-beta.19",
|
||||
"version": "1.2.0-alpha.0",
|
||||
"useWorkspaces": true,
|
||||
"npmClient": "yarn"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@dxos/console",
|
||||
"version": "1.0.0-beta.0",
|
||||
"version": "1.2.0-alpha.0",
|
||||
"description": "Console",
|
||||
"main": "index.js",
|
||||
"private": true,
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
for appdir in `find ./packages -name '*-app' -type d | grep -v node_modules`; do
|
||||
for appdir in `find ./apps -name '*-app' -type d | grep -v node_modules`; do
|
||||
pushd $appdir
|
||||
|
||||
WNS_ORG="dxos"
|
||||
WNS_ORG="${WNS_ORG:-dxos}"
|
||||
PKG_CHANNEL="${PKG_CHANNEL:-}"
|
||||
PKG_NAME=`cat package.json | jq -r '.name' | cut -d'/' -f2- | sed 's/-app$//'`
|
||||
WNS_NAME="$WNS_ORG/$PKG_NAME"
|
||||
|
||||
@ -14,6 +15,9 @@ name: $PKG_NAME
|
||||
build: yarn dist
|
||||
EOF
|
||||
|
||||
cat app.yml
|
||||
echo "wrn://${WNS_ORG}/application/${PKG_NAME}${PKG_CHANNEL}"
|
||||
|
||||
yarn clean
|
||||
yarn -s wire app build
|
||||
|
||||
@ -22,7 +26,7 @@ EOF
|
||||
else
|
||||
yarn -s wire app publish
|
||||
fi
|
||||
yarn -s wire app register --name "wrn://${WNS_ORG}/application/${PKG_NAME}"
|
||||
|
||||
yarn -s wire app register --name "wrn://${WNS_ORG}/application/${PKG_NAME}${PKG_CHANNEL}"
|
||||
popd
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user