diff --git a/.gitea/workflows/publish-packages.yml b/.gitea/workflows/publish-packages.yml index 2c72309c..99511597 100644 --- a/.gitea/workflows/publish-packages.yml +++ b/.gitea/workflows/publish-packages.yml @@ -99,10 +99,13 @@ jobs: pnpm --filter "$name" test (cd "$dir" && pnpm pack --pack-destination /tmp/tarballs) if [ "$DRY_RUN" = "true" ]; then - echo "DRY RUN: skipping publish for $name@$version" + echo "DRY RUN: would publish $name@$version" else - (cd "$dir" && pnpm publish --no-git-checks --userconfig /tmp/publish.npmrc --registry https://gitea.bytelyst.com/api/packages/bytelyst/npm/) - npm view "$name@$version" dist.shasum --userconfig /tmp/publish.npmrc --registry https://gitea.bytelyst.com/api/packages/bytelyst/npm/ + cp /tmp/publish.npmrc "$dir/.npmrc" + trap 'rm -f "$dir/.npmrc"' EXIT + (cd "$dir" && pnpm publish --no-git-checks --registry https://gitea.bytelyst.com/api/packages/bytelyst/npm/) + rm -f "$dir/.npmrc" + npm view "$name@$version" version dist.shasum dist.tarball --userconfig /tmp/publish.npmrc --registry https://gitea.bytelyst.com/api/packages/bytelyst/npm/ fi done < /tmp/packages-to-publish.tsv