Change publish process

This commit is contained in:
adrinr 2023-04-20 12:50:26 +01:00
parent 8faed6cfbc
commit 1bcb481d69
2 changed files with 20 additions and 9 deletions

View File

@ -3,8 +3,8 @@ concurrency: release-prerelease
on:
push:
branches:
- develop
tags:
- v*-alpha.*
paths:
- ".aws/**"
- ".github/**"
@ -30,24 +30,35 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Fail if branch is not develop
if: github.ref != 'refs/heads/develop'
run: |
echo "Ref is not develop, you must run this job from develop."
exit 1
- uses: actions/checkout@v2
with:
submodules: true
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fetch-depth: 1
- name: Fail if tag is not develop
run: |
if ! git merge-base --is-ancestor ${{ github.sha }} origin/develop; then
echo "Tag is not in develop"
exit 1
fi
- uses: actions/setup-node@v1
with:
node-version: 14.x
- run: yarn
- name: Update versions
run: |
version=$(cat versions/package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
yarn lerna exec "yarn version --no-git-tag-version --new-version=$tag"
- run: yarn bootstrap
- run: yarn build
- run: yarn build:sdk
# - run: yarn test
- name: Publish budibase packages to NPM
env:

View File

@ -30,7 +30,7 @@
"build:sdk": "lerna run --stream build:sdk",
"deps:circular": "madge packages/server/dist/index.js packages/worker/src/index.ts packages/backend-core/dist/src/index.js packages/cli/src/index.js --circular",
"release": "lerna publish ${RELEASE_VERSION_TYPE:-patch} --yes --force-publish",
"release:develop": "lerna publish prerelease --yes --force-publish --dist-tag develop --exact",
"release:develop": "npm publish",
"restore": "yarn run clean && yarn run bootstrap && yarn run build",
"nuke": "yarn run nuke:packages && yarn run nuke:docker",
"nuke:packages": "yarn run restore",