@nerd-bible/valio 0.0.7 → 0.0.8
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.
- package/.github/workflows/publish.yml +7 -5
- package/package.json +20 -20
- package/publish.sh +19 -0
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
name: Publish Package
|
|
2
2
|
on:
|
|
3
3
|
push:
|
|
4
|
-
|
|
5
|
-
-
|
|
4
|
+
branches:
|
|
5
|
+
- master
|
|
6
6
|
permissions:
|
|
7
|
-
id-token: write #
|
|
8
|
-
contents:
|
|
7
|
+
id-token: write # npm OIDC
|
|
8
|
+
contents: write # push tags
|
|
9
9
|
jobs:
|
|
10
10
|
publish:
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
steps:
|
|
13
13
|
- uses: actions/checkout@v4
|
|
14
|
+
with:
|
|
15
|
+
fetch-depth: 0
|
|
14
16
|
- uses: oven-sh/setup-bun@v2
|
|
15
17
|
- run: bun ci
|
|
16
18
|
- run: bun run build
|
|
17
19
|
- run: bun test
|
|
18
20
|
- run: bun run fmt
|
|
19
|
-
- run:
|
|
21
|
+
- run: ./publish.sh
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
2
|
+
"name": "@nerd-bible/valio",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"devDependencies": {
|
|
7
|
+
"@biomejs/biome": "^2.3.1",
|
|
8
|
+
"@types/bun": "latest"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"fmt": "biome check",
|
|
13
|
+
"fmt-fix": "biome check --write --unsafe"
|
|
14
|
+
},
|
|
15
|
+
"peerDependencies": {
|
|
16
|
+
"typescript": "^5.9.3"
|
|
17
|
+
},
|
|
18
|
+
"version": "0.0.8",
|
|
19
|
+
"repository": {
|
|
20
|
+
"url": "git+https://github.com/nerd-bible/valio"
|
|
21
|
+
}
|
|
22
22
|
}
|
package/publish.sh
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
TAG_CMD="git describe --tags --abbrev=0 --match=v[0-9]*.[0-9]*.[0-9]*"
|
|
5
|
+
|
|
6
|
+
git fetch --tags
|
|
7
|
+
VERSION=$($TAG_CMD --exact-match 2>/dev/null || true)
|
|
8
|
+
if [[ -z $VERSION ]]; then
|
|
9
|
+
VERSION=$($TAG_CMD 2>/dev/null || echo 'v0.0.0')
|
|
10
|
+
echo "No manual tag, bumping $VERSION"
|
|
11
|
+
VERSION=$(echo $VERSION | awk -F. -v OFS=. '{$NF += 1 ; print}')
|
|
12
|
+
git tag $VERSION
|
|
13
|
+
git push --tags origin master
|
|
14
|
+
fi
|
|
15
|
+
echo "Publishing $VERSION"
|
|
16
|
+
cat <<< $(jq ".version = \"${VERSION:1}\" |\
|
|
17
|
+
.repository.url = \"git+$GITHUB_SERVER_URL/$GITHUB_REPOSITORY\"" package.json) > package.json
|
|
18
|
+
|
|
19
|
+
bunx npm@latest publish
|