0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-30 20:33:54 -05:00

ci: update publish workflow (#1358)

* chore: set lerna changelogPreset

* fix: version script

* ci: update publish workflow
This commit is contained in:
Gao Sun 2022-07-01 22:39:21 +08:00 committed by GitHub
parent f84bc6eedd
commit 30218579cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 4 deletions

View file

@ -10,9 +10,12 @@ on:
description: Pre ID description: Pre ID
required: true required: true
default: alpha default: alpha
append:
description: Additional options
jobs: jobs:
publish: publish:
environment: release
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -32,7 +35,7 @@ jobs:
- name: Publish to GitHub - name: Publish to GitHub
# add `no-verify-access` due to https://github.com/lerna/lerna/issues/2788 # add `no-verify-access` due to https://github.com/lerna/lerna/issues/2788
run: | run: |
pnpm -- lerna publish -m "release: %s" --conventional-commits --preid=${{ github.event.inputs.preid }} --no-verify-access --create-release=github --yes ${{ github.event.inputs.semver }} pnpm lerna publish -m "release: %s" --conventional-commits --preid=${{ github.event.inputs.preid }} --no-verify-access --create-release=github --yes ${{ github.event.inputs.semver }}
env: env:
GH_TOKEN: ${{ secrets.BOT_PAT }} GH_TOKEN: ${{ secrets.BOT_PAT }}

View file

@ -4,6 +4,6 @@ const { rules } = require('@commitlint/config-conventional');
module.exports = { module.exports = {
extends: ['@commitlint/config-conventional'], extends: ['@commitlint/config-conventional'],
rules: { rules: {
'type-enum': [2, 'always', [...rules['type-enum'][2], 'api']], 'type-enum': [2, 'always', [...rules['type-enum'][2], 'api', 'release']],
}, },
}; };

View file

@ -1,5 +1,6 @@
{ {
"version": "0.1.0", "version": "0.1.0",
"npmClient": "pnpm", "npmClient": "pnpm",
"useWorkspaces": true "useWorkspaces": true,
"changelogPreset": "conventionalcommits"
} }

View file

@ -4,6 +4,7 @@
"license": "MPL-2.0", "license": "MPL-2.0",
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm", "preinstall": "npx only-allow pnpm",
"version": "pnpm i --frozen-lockfile=false && git add pnpm-lock.yaml",
"lerna": "lerna", "lerna": "lerna",
"bootstrap": "lerna bootstrap", "bootstrap": "lerna bootstrap",
"prepare": "if test \"$NODE_ENV\" != \"production\" && test \"$CI\" != \"true\" ; then husky install ; fi", "prepare": "if test \"$NODE_ENV\" != \"production\" && test \"$CI\" != \"true\" ; then husky install ; fi",

View file

@ -7,7 +7,6 @@
"private": true, "private": true,
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"version": "pnpm i --frozen-lockfile=false",
"precommit": "lint-staged", "precommit": "lint-staged",
"start": "parcel src/index.html", "start": "parcel src/index.html",
"dev": "cross-env PORT=5003 parcel src/index.html --public-url /demo-app --no-cache --hmr-port 6003", "dev": "cross-env PORT=5003 parcel src/index.html --public-url /demo-app --no-cache --hmr-port 6003",