Skip to content

Commit e1cf17e

Browse files
committed
Fix release provenance recovery
1 parent 6fca55d commit e1cf17e

5 files changed

Lines changed: 40 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# SimDeck Release Workflow
22
#
33
# Triggered manually from the Actions tab. Picks one package, bumps its version
4-
# locally with `npm version`, commits + tags, builds, and publishes:
4+
# locally with `npm version` or reuses the current version, commits + tags,
5+
# builds, and publishes:
56
# - npm packages publish over OIDC trusted publishing (no NPM_TOKEN).
67
# - The VS Code extension publishes via vsce + VSCE_PAT (no OIDC option).
78
#
@@ -40,11 +41,12 @@ on:
4041
- "@nativescript/simdeck-inspector"
4142
- simdeck-vscode
4243
bump:
43-
description: "Version bump"
44+
description: "Version bump (use current to publish the checked-in version without bumping)"
4445
required: true
4546
type: choice
4647
default: prerelease
4748
options:
49+
- current
4850
- prerelease
4951
- patch
5052
- minor
@@ -179,18 +181,25 @@ jobs:
179181
set -euo pipefail
180182
cd "$PKG_DIR"
181183
182-
if [[ "$BUMP" == "prerelease" ]]; then
184+
if [[ "$BUMP" == "current" ]]; then
185+
version="$(node -p "require('./package.json').version")"
186+
elif [[ "$BUMP" == "prerelease" ]]; then
183187
new="$(npm version prerelease --preid "$PREID" --no-git-tag-version)"
188+
version="${new#v}"
184189
else
185190
new="$(npm version "$BUMP" --no-git-tag-version)"
191+
version="${new#v}"
186192
fi
187193
188-
version="${new#v}"
189194
tag="${SLUG}-v${version}"
190195
191196
echo "version=${version}" >> "$GITHUB_OUTPUT"
192197
echo "tag=${tag}" >> "$GITHUB_OUTPUT"
193-
echo "Bumped to ${version} (tag ${tag})"
198+
if [[ "$BUMP" == "current" ]]; then
199+
echo "Using current version ${version} (tag ${tag})"
200+
else
201+
echo "Bumped to ${version} (tag ${tag})"
202+
fi
194203
195204
- name: Resolve dist-tag
196205
id: tag
@@ -218,8 +227,15 @@ jobs:
218227
INPUT_PACKAGE: ${{ inputs.package }}
219228
NEW_VERSION: ${{ steps.version.outputs.version }}
220229
TAG: ${{ steps.version.outputs.tag }}
230+
BUMP: ${{ inputs.bump }}
221231
run: |
222232
set -euo pipefail
233+
if [[ "$BUMP" == "current" ]]; then
234+
git tag -f "${TAG}"
235+
git push --force origin "${TAG}"
236+
exit 0
237+
fi
238+
223239
git add "${PKG_DIR}/package.json"
224240
if [[ -f "${PKG_DIR}/package-lock.json" ]]; then
225241
git add "${PKG_DIR}/package-lock.json"

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
"version": "0.1.2",
44
"description": "Native macOS simulator control plane with a browser client",
55
"license": "Apache-2.0",
6+
"repository": {
7+
"type": "git",
8+
"url": "https://github.com/NativeScript/SimDeck"
9+
},
610
"bin": {
711
"simdeck": "bin/simdeck.mjs"
812
},

packages/nativescript-inspector/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
"version": "0.1.0",
44
"description": "Debug-only NativeScript runtime inspector for simdeck",
55
"license": "Apache-2.0",
6+
"repository": {
7+
"type": "git",
8+
"url": "https://github.com/NativeScript/SimDeck",
9+
"directory": "packages/nativescript-inspector"
10+
},
611
"main": "dist/index.js",
712
"types": "dist/index.d.ts",
813
"exports": {

packages/react-native-inspector/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
"version": "0.1.0",
44
"description": "Debug-only React Native runtime inspector for SimDeck",
55
"license": "Apache-2.0",
6+
"repository": {
7+
"type": "git",
8+
"url": "https://github.com/NativeScript/SimDeck",
9+
"directory": "packages/react-native-inspector"
10+
},
611
"main": "dist/index.js",
712
"types": "dist/index.d.ts",
813
"react-native": "src/index.ts",

packages/vscode-extension/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
"version": "0.1.3",
66
"publisher": "nativescript",
77
"license": "Apache-2.0",
8+
"repository": {
9+
"type": "git",
10+
"url": "https://github.com/NativeScript/SimDeck",
11+
"directory": "packages/vscode-extension"
12+
},
813
"icon": "simdeck-logo.png",
914
"engines": {
1015
"vscode": "^1.90.0"

0 commit comments

Comments
 (0)