Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,26 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
pnpm changeset version --snapshot dev
VERSION=$(node -p "require('./apps/pythinker-code/package.json').version")
if npm view "@pymodel/pythinker-code@$VERSION" version >/dev/null 2>&1; then
echo "already published — no new commits"
exit 0
fi
pnpm changeset publish --tag dev --no-git-tag
publish_log="$RUNNER_TEMP/dev-snapshot-publish.log"
set +e
pnpm changeset publish --tag dev --no-git-tag 2>&1 | tee "$publish_log"
status=${PIPESTATUS[0]}
set -e
if [ "$status" -eq 0 ]; then
exit 0
fi
if grep -Eq 'could not be found or you do not have permission to access it|npm error 404' "$publish_log"; then
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
echo "::warning::Skipping dev snapshot publish because npm denied publish permissions for this workflow identity."
exit 0
fi
exit "$status"

desktop-nightly:
name: Publish desktop Nightly
Expand Down
2 changes: 2 additions & 0 deletions scripts/release/release-workflows.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ void test('nightly reconciliation maintains one release drift issue', () => {
assert.match(workflow, /Release lane drift detected/u);
assert.match(workflow, /issues: write/u);
assert.match(workflow, /pull-requests: read/u);
assert.match(workflow, /dev-snapshot-publish\.log/u);
assert.match(workflow, /Skipping dev snapshot publish because npm denied publish permissions/u);
assert.equal(publishJob.includes('GITHUB_TOKEN: ${{ github.token }}'), true);
assert.doesNotMatch(workflow, /uses: actions\/(checkout|setup-node)@v\d+/u);
assert.equal(workflow.match(/persist-credentials: false/gu)?.length, 2);
Expand Down
Loading