@nerd-bible/valio 0.0.8 → 0.0.9
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 +5 -1
- package/package.json +1 -1
- package/publish.sh +6 -2
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
name: Publish Package
|
|
2
2
|
on:
|
|
3
3
|
push:
|
|
4
|
+
tags:
|
|
5
|
+
- v*
|
|
4
6
|
branches:
|
|
5
7
|
- master
|
|
6
8
|
permissions:
|
|
@@ -10,9 +12,11 @@ jobs:
|
|
|
10
12
|
publish:
|
|
11
13
|
runs-on: ubuntu-latest
|
|
12
14
|
steps:
|
|
15
|
+
- name: Print GitHub event action
|
|
16
|
+
run: echo "${{ github.event_name }}"
|
|
13
17
|
- uses: actions/checkout@v4
|
|
14
18
|
with:
|
|
15
|
-
fetch-depth: 0
|
|
19
|
+
fetch-depth: 0 # whole history needed for potential tag bump
|
|
16
20
|
- uses: oven-sh/setup-bun@v2
|
|
17
21
|
- run: bun ci
|
|
18
22
|
- run: bun run build
|
package/package.json
CHANGED
package/publish.sh
CHANGED
|
@@ -5,6 +5,7 @@ TAG_CMD="git describe --tags --abbrev=0 --match=v[0-9]*.[0-9]*.[0-9]*"
|
|
|
5
5
|
|
|
6
6
|
git fetch --tags
|
|
7
7
|
VERSION=$($TAG_CMD --exact-match 2>/dev/null || true)
|
|
8
|
+
# is the latest commit missing a version tag?
|
|
8
9
|
if [[ -z $VERSION ]]; then
|
|
9
10
|
VERSION=$($TAG_CMD 2>/dev/null || echo 'v0.0.0')
|
|
10
11
|
echo "No manual tag, bumping $VERSION"
|
|
@@ -13,7 +14,10 @@ if [[ -z $VERSION ]]; then
|
|
|
13
14
|
git push --tags origin master
|
|
14
15
|
fi
|
|
15
16
|
echo "Publishing $VERSION"
|
|
16
|
-
cat
|
|
17
|
-
.
|
|
17
|
+
JIT_JSON=$(cat package.json | jq "
|
|
18
|
+
.version = \"${VERSION:1}\" |
|
|
19
|
+
.repository.url = \"git+$GITHUB_SERVER_URL/$GITHUB_REPOSITORY\"
|
|
20
|
+
")
|
|
21
|
+
echo -E "$JIT_JSON" > package.json
|
|
18
22
|
|
|
19
23
|
bunx npm@latest publish
|