Publish workflow: a package's first release passes --first-release, which the checker verifies
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
652b0837d2
commit
4c7ae3adc6
1 changed files with 12 additions and 2 deletions
14
.github/workflows/publish-packages.yml
vendored
14
.github/workflows/publish-packages.yml
vendored
|
|
@ -75,11 +75,17 @@ jobs:
|
|||
if: startsWith(github.ref, 'refs/tags/cultcache-ts-v')
|
||||
run: |
|
||||
tagged="${GITHUB_REF_NAME#cultcache-ts-v}"
|
||||
# The package's first release carries --first-release. The checker believes it only
|
||||
# when no other cultcache-ts tag exists, so this test only avoids refusing the
|
||||
# releases that follow; it does not decide anything.
|
||||
first=""
|
||||
if [ -z "$(git tag -l 'cultcache-ts-v*' | grep -vxF "$GITHUB_REF_NAME" || true)" ]; then first="--first-release"; fi
|
||||
node scripts/check-changelog-semver.mjs \
|
||||
--package "@gamecult/cultcache-ts" \
|
||||
--changelog packages/cultcache-ts/CHANGELOG.md \
|
||||
--version "$tagged" \
|
||||
--tag-prefix cultcache-ts
|
||||
--tag-prefix cultcache-ts \
|
||||
$first
|
||||
|
||||
- name: Build and test
|
||||
working-directory: packages/cultcache-ts
|
||||
|
|
@ -159,11 +165,15 @@ jobs:
|
|||
if: steps.selected.outputs.run == 'true' && startsWith(github.ref, 'refs/tags/')
|
||||
run: |
|
||||
tagged="${GITHUB_REF_NAME#${{ matrix.package }}-v}"
|
||||
# See the cultcache-ts job: the checker, not this test, decides whether a first release is real.
|
||||
first=""
|
||||
if [ -z "$(git tag -l '${{ matrix.package }}-v*' | grep -vxF "$GITHUB_REF_NAME" || true)" ]; then first="--first-release"; fi
|
||||
node scripts/check-changelog-semver.mjs \
|
||||
--package "${{ matrix.package }}" \
|
||||
--changelog packages/${{ matrix.package }}/CHANGELOG.md \
|
||||
--version "$tagged" \
|
||||
--tag-prefix "${{ matrix.package }}"
|
||||
--tag-prefix "${{ matrix.package }}" \
|
||||
$first
|
||||
|
||||
# Lower layers install from source so a release of one package is tested
|
||||
# against the sibling revision it was cut with, not whatever PyPI has.
|
||||
|
|
|
|||
Loading…
Reference in a new issue