0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-23 20:33:16 -05:00
logto/.github/workflows/publish.yml
Gao Sun 30218579cc
ci: update publish workflow (#1358)
* chore: set lerna changelogPreset

* fix: version script

* ci: update publish workflow
2022-07-01 22:39:21 +08:00

48 lines
1.3 KiB
YAML

name: Publish
on:
workflow_dispatch:
inputs:
semver:
description: Semver bump type
required: true
preid:
description: Pre ID
required: true
default: alpha
append:
description: Additional options
jobs:
publish:
environment: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.BOT_PAT }}
- name: Setup Node and pnpm
uses: silverhand-io/actions-node-pnpm-run-steps@v1.2.2
- name: Configure Git user
run: |
git config --global user.email bot@silverhand.io
git config --global user.name silverhand-bot
- name: Publish to GitHub
# add `no-verify-access` due to https://github.com/lerna/lerna/issues/2788
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 }}
env:
GH_TOKEN: ${{ secrets.BOT_PAT }}
- name: Package
run: ./package.sh
- name: Upload tar to GitHub release
uses: softprops/action-gh-release@v1
with:
files: /tmp/logto.tar.gz