chore: Use deep clone in release pipeline #22
This file contains hidden or 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: ["release"] | |
jobs: | |
release-prebuild: | |
uses: ./.github/workflows/build.yml | |
release: | |
runs-on: ubuntu-latest | |
needs: release-prebuild | |
steps: | |
- name: set git config | |
run: | | |
git config --global user.name "${GITHUB_ACTOR}" | |
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com" | |
git config -l | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # We need a deep clone to calculate new version | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v3 # docs https://pnpm.io/continuous-integration#github-actions | |
with: | |
version: 9 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- run: pnpm install | |
- run: pnpm exec commit-and-tag-version | |
- run: git push HEAD:main && git push --tags |