@nimiplatform/app-tools 0.2.5 → 0.2.7

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.
@@ -82,7 +82,7 @@ const APP_RELEASE_WORKFLOW = [
82
82
  ' - run: pnpm exec nimi-app test',
83
83
  ' - name: Require tag/version lockstep',
84
84
  " if: github.event_name == 'push' && github.ref_type == 'tag'",
85
- ' run: node -e "const p=require(\'./package.json\'); if (process.env.GITHUB_REF_NAME !== `v${p.version}`) throw new Error(\'tag_version_mismatch\')"',
85
+ ' run: node -e "const p=require(\'./package.json\'); if (process.env.GITHUB_REF_NAME !== (\'v\' + p.version)) throw new Error(\'tag_version_mismatch\')"',
86
86
  ' - name: Require annotated tag bound to this commit',
87
87
  " if: github.event_name == 'push' && github.ref_type == 'tag'",
88
88
  ' shell: bash',
@@ -251,7 +251,8 @@ const APP_RELEASE_WORKFLOW = [
251
251
  ' assets=(release-assets/*.nimiapp release-assets/*.candidate.json)',
252
252
  ' test "${#assets[@]}" -gt 0',
253
253
  " expected=$(printf '%s\\n' \"${assets[@]##*/}\" | jq -R -s -c 'split(\"\\n\")[:-1] | sort')",
254
- ' if release_json=$(gh api "repos/$GITHUB_REPOSITORY/releases/tags/$GITHUB_REF_NAME" 2>/dev/null); then',
254
+ ' if release_id=$(gh release view "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --json databaseId --jq .databaseId 2>/dev/null); then',
255
+ ' release_json=$(gh api "repos/$GITHUB_REPOSITORY/releases/$release_id")',
255
256
  ' existing=$(jq -c \'.assets | map(.name) | sort\' <<<"$release_json")',
256
257
  " unexpected=$(jq -n --argjson existing \"$existing\" --argjson expected \"$expected\" '$existing - $expected | length')",
257
258
  ' test "$unexpected" -eq 0',
@@ -262,8 +263,11 @@ const APP_RELEASE_WORKFLOW = [
262
263
  ' exit 0',
263
264
  ' fi',
264
265
  ' else',
265
- ' gh release create "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --draft --verify-tag --title "$GITHUB_REF_NAME" --notes-from-tag',
266
- ' release_json=$(gh api "repos/$GITHUB_REPOSITORY/releases/tags/$GITHUB_REF_NAME")',
266
+ ' tag_object=$(gh api "repos/$GITHUB_REPOSITORY/git/ref/tags/$GITHUB_REF_NAME" --jq .object.sha)',
267
+ ' gh api "repos/$GITHUB_REPOSITORY/git/tags/$tag_object" --jq .message > release-notes.md',
268
+ ' gh release create "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --draft --verify-tag --title "$GITHUB_REF_NAME" --notes-file release-notes.md',
269
+ ' release_id=$(gh release view "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --json databaseId --jq .databaseId)',
270
+ ' release_json=$(gh api "repos/$GITHUB_REPOSITORY/releases/$release_id")',
267
271
  ' fi',
268
272
  ' verify_dir=$(mktemp -d)',
269
273
  ' for asset in "${assets[@]}"; do',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nimiplatform/app-tools",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Public app-authoring CLI for Nimi App projects.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "nimiScaffoldVersions": {
21
21
  "sdkVersion": "^0.9.0",
22
- "appToolsVersion": "^0.2.5",
22
+ "appToolsVersion": "^0.2.7",
23
23
  "nimicodingVersion": "0.6.1",
24
24
  "aiSdkVersion": "^6.0.85",
25
25
  "kitVersion": "^0.5.0",