Skip to content

Commit

Permalink
ci: release betas
Browse files Browse the repository at this point in the history
[skip actions]
  • Loading branch information
zhzz committed Apr 28, 2023
1 parent 255c367 commit 7f35744
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 6 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release_beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: release-beta
run-name: release beta 🚀
on:
pull_request:
types: [closed]
branches:
- next
jobs:
beta:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Node.js
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'yarn'
- name: Install dependencies
run: yarn
- name: Set Git Credentials
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"
- name: Release Beta
run: yarn release:beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/release_beta_minor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: release-beta-minor
run-name: release beta minor 🚀
on: workflow_dispatch
jobs:
beta:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Node.js
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'yarn'
- name: Install dependencies
run: yarn
- name: Set Git Credentials
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"
- name: Release Beta Minor
run: yarn release:beta:minor
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
9 changes: 8 additions & 1 deletion .teamcity/settings.kts
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,10 @@ object ReactUI_Publish : BuildType({
triggers {
vcs {
id = "TRIGGER_1"
branchFilter = "+:@skbkontur/react-ui@*"
branchFilter = """
+:@skbkontur/react-ui@*
-:next
""".trimIndent()
}
}

Expand Down Expand Up @@ -682,6 +685,10 @@ object Validations_Publish : BuildType({
triggers {
vcs {
id = "TRIGGER_1"
branchFilter = """
+:*
-:next
""".trimIndent()
}
}

Expand Down
6 changes: 3 additions & 3 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"useWorkspaces": true,
"command": {
"version": {
"createRelease": "github",
"conventionalCommits": true,
"message": "chore(release): publish",
"ignoreChanges": ["packages/react-ui-testing/TestPages/**"]
"message": "chore(release): publish [skip actions]",
"ignoreChanges": ["packages/react-ui-testing/TestPages/**"],
"includeMergedTags": true
}
}
}
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
},
"scripts": {
"commit": "git-cz",
"release": "env-cmd lerna version",
"release": "env-cmd lerna version --create-release github",
"release:version:beta": "lerna version prerelease --preid beta --yes",
"release:version:beta:minor": "lerna version preminor --preid beta --yes",
"release:publish:next": "lerna publish from-git --dist-tag next --yes",
"release:beta": "yarn release:version:beta && yarn release:publish:next",
"release:beta:minor": "yarn release:version:beta:minor && yarn release:publish:next",
"prepare": "husky install",
"preinstall": "node scripts/update-package-registry",
"postinstall": "node scripts/update-package-registry back"
Expand Down
4 changes: 4 additions & 0 deletions packages/react-ui-validations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "react-ui-validations",
"version": "1.12.0",
"description": "Validations for @skbkontur/react-ui",
"publishConfig": {
"directory": "./build/react-ui-dist"
},
"scripts": {
"prebuild": "yarn clean",
"clean": "rimraf dist build",
Expand All @@ -16,6 +19,7 @@
"deploy:retail-ui": "yarn --cwd ./build/retail-ui-dist publish --non-interactive",
"deploy:react-ui": "yarn --cwd ./build/react-ui-dist publish --non-interactive",
"deploy:docs": "gh-pages -a -d dist -r git@github.com:skbkontur/react-ui-validations.git",
"prepublishOnly": "yarn predeploy",
"storybook": "cross-env STORYBOOK_REACT_UI_TEST=true start-storybook -p 8081",
"start:docs": "webpack-dev-server -d --config webpack.docs.config.js --hot",
"lint": "npm-run-all --continue-on-error --parallel lint:*",
Expand Down
6 changes: 5 additions & 1 deletion packages/react-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@
"bugs": {
"url": "https://github.com/skbkontur/retail-ui/issues"
},
"publishConfig": {
"directory": "build"
},
"scripts": {
"prebuild": "run-s clean build:types",
"build:types": "tsc -p ./prod.tsconfig.json --emitDeclarationOnly --diagnostics --outDir build",
"build:cjs": "cross-env BABEL_ENV=cjs node scripts/build",
"build:esm": "node scripts/build",
"build": "run-p build:esm build:cjs && node scripts/build/postbuild",
"clean": "git clean -fdxqe node_modules",
"prerelease": "node scripts/publish/prepublish && yarn build",
"prepublishOnly": "yarn build",
"prerelease": "node scripts/publish/prepublish",
"release": "npm publish ./build",
"postrelease": "yarn deploy",
"predeploy": "rimraf .styleguide/deploy && yarn run styleguide:build",
Expand Down

0 comments on commit 7f35744

Please sign in to comment.