chore(dev-deps): bump semantic-release/npm #364
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: [main, beta] | |
jobs: | |
init: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/quickstart | |
- uses: wagoid/commitlint-github-action@v5 | |
env: | |
NODE_PATH: ${{ github.workspace }}/node_modules | |
validate: | |
needs: init | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/quickstart | |
- run: pnpm --filter="@chakra-icons/*" --filter="create-*" run lint | |
test: | |
needs: init | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/quickstart | |
- run: pnpm run test | |
build: | |
env: | |
NODE_OPTIONS: --max_old_space_size=8192 | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
GH_USER: "kdnjbot" | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GIT_AUTHOR_EMAIL: "[email protected]" | |
GIT_COMMITTER_EMAIL: "[email protected]" | |
GIT_AUTHOR_NAME: "@kdnjbot" | |
GIT_COMMITTER_NAME: "@kdnjbot" | |
needs: init | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/quickstart | |
- run: pnpm run build | |
- name: release | |
run: | | |
find . -type f -name "package.json" -not -path './node_modules*' -not -path './.git*' -exec sed -i 's/workspace:\*/\*/g' {} \; | |
mv ./node_modules ./node_modules_pnpm | |
yarn install | |
yarn release | |
rm -rf ./node_modules | |
mv ./node_modules_pnpm ./node_modules | |
# PATCH: replace workspace:* to * | |
# multi-semantic-release (especially @semrel-extra/npm not supported version `workspace:*`. | |
# So, need to replace it before release | |
# homebin=$HOME/kdnj/bin | |
# mkdir -p $homebin | |
# echo -e '#!/bin/bash\npnpm "$@"' > $homebin/npm && chmod +x $homebin/npm | |
# rc=/tmp/rcfile | |
# echo 'shopt -s expand_aliases' > $rc | |
# echo 'alias npm="$homebin/npm"' >> $rc | |
# source $rc | |
# replace workspace:* to * | |
# find . -type f -name "package.json" -not -path './node_modules*' -not -path './.git*' -exec sed -i 's/workspace:\*/\*/g' {} \; | |
# replace link:* to | |
# find . -type f -name "pnpm-lock.yaml" -not -path './node_modules*' -not -path './.git*' -exec sed -i 's/link:\*/file:\*/g' {} \; | |
# npm --help | |
# pnpm run release |