Skip to content

Commit

Permalink
ci: fix conventional graduate
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianCataldo committed Oct 11, 2023
1 parent 39824c4 commit 7c63260
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: 'actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744' # v3.6.0
# run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
with:
fetch-depth: '0'
fetch-depth: 0

# - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
# persist-credentials: false
Expand Down Expand Up @@ -112,13 +112,25 @@ jobs:

- name: 'Lerna publish [main]'
if: github.ref == 'refs/heads/main'
# --create-release=github not working
# https://github.com/lerna/lerna/issues/2532
id: graduateRelease
continue-on-error: true
env:
GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
NPM_TOKEN: '${{ secrets.NPM_TOKEN }}' # Not really needed (already global)
run: |
pnpm lerna publish --conventional-commits --exact --conventional-graduate --create-release=github --yes
- name: Bump Prod Version Fallback
if: ${{ always() && steps.graduateRelease.outcome == 'failure' }}
env:
GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
NPM_TOKEN: '${{ secrets.NPM_TOKEN }}'
run: |
echo Falling back to non-graduate release due to https://github.com/lerna/lerna/issues/2532
git stash
pnpm lerna publish --conventional-commits --exact --create-release=github --yes
- name: 'Lerna publish [next]'
if: github.ref == 'refs/heads/next'
env:
Expand Down

0 comments on commit 7c63260

Please sign in to comment.