release-please-action
release-please-action copied to clipboard
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TL;DR
Expected behavior
No response
Observed behavior
No response
Action YAML
name: release-please
on:
push:
branches:
- release
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
package-name: allaihub-admin
default-branch: release
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false}]'
extra-files: |
README.md
CHANGELOG.md
- uses: actions/checkout@v3
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v3
with:
node-version: 18
if: ${{ steps.release.outputs.release_created }}
- name: Set version env variable
run: |
# 获取package.json中的版本号
version=$(node -p "require('./package.json').version")
echo "RELEASE_VERSION=${version}" >> $GITHUB_ENV
# 输出版本号
echo Release version: ${{ env.RELEASE_VERSION }}
if: ${{ steps.release.outputs.release_created }}
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
if: ${{ steps.release.outputs.release_created }}
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
if: ${{ steps.release.outputs.release_created }}
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
if: ${{ steps.release.outputs.release_created }}
- name: Install dependencies
run: pnpm install
if: ${{ steps.release.outputs.release_created }}
- name: Build
run: pnpm pro
if: ${{ steps.release.outputs.release_created }}
- name: setServerName
run: pnpm setServerName pro
if: ${{ steps.release.outputs.release_created }}
Log output
No response
Additional information
No response