thecheesiumrunner 3.0.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,42 @@
1
+ name: Publish npm package
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ concurrency:
9
+ group: npm-publish-main
10
+ cancel-in-progress: false
11
+
12
+ jobs:
13
+ publish:
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ contents: read
17
+ id-token: write
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - uses: actions/setup-node@v4
22
+ with:
23
+ node-version: '24'
24
+ registry-url: 'https://registry.npmjs.org'
25
+
26
+ - name: Publish to npm
27
+ run: |
28
+ set -eu
29
+
30
+ REPO_VERSION="$(node -p "require('./package.json').version")"
31
+ PUBLISHED_VERSION="$(npm view thecheesiumrunner version 2>/dev/null || true)"
32
+
33
+ if [ -z "$PUBLISHED_VERSION" ]; then
34
+ echo "Publishing first version $REPO_VERSION"
35
+ elif [ "$REPO_VERSION" = "$PUBLISHED_VERSION" ]; then
36
+ npm version patch --no-git-tag-version
37
+ elif [ "$(printf '%s\n%s\n' "$REPO_VERSION" "$PUBLISHED_VERSION" | sort -V | tail -n 1)" = "$PUBLISHED_VERSION" ]; then
38
+ npm version "$PUBLISHED_VERSION" --no-git-tag-version --allow-same-version
39
+ npm version patch --no-git-tag-version
40
+ fi
41
+
42
+ npm publish --access public