fr.jeanf.eventsystem 0.3.2 → 0.3.3-alpha.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.
package/.attestation.p7m CHANGED
Binary file
package/.gitattributes ADDED
@@ -0,0 +1 @@
1
+ *.sh text eol=lf
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env bash
2
+ # Pack and publish a signed Unity package tarball.
3
+ # Usage: publish-unity.sh <npm-dist-tag>
4
+ # Empty, null, false, or undefined selects the latest tag.
5
+ set -euo pipefail
6
+
7
+ CHANNEL="${1:-}"
8
+ if [[ -z "${CHANNEL}" || "${CHANNEL}" == "null" || "${CHANNEL}" == "false" || "${CHANNEL}" == "undefined" ]]; then
9
+ TAG="latest"
10
+ else
11
+ # npm dist-tags cannot contain "/". prerelease/alpha -> alpha
12
+ TAG="${CHANNEL##*/}"
13
+ fi
14
+
15
+ # Install the official UPM CLI (adds `upm` to PATH via shell profile,
16
+ # which a non-interactive CI shell does NOT pick up — so resolve the
17
+ # binary directly below).
18
+ # https://docs.unity3d.com/6000.3/Documentation/Manual/upm-cli.html
19
+ curl -fsSL https://cdn.packages.unity.com/upm-cli/install.sh | bash
20
+
21
+ UPM_BIN="$(command -v upm || true)"
22
+ if [ -z "${UPM_BIN}" ]; then
23
+ UPM_BIN="$(find "${HOME}" -type f -name upm 2>/dev/null | head -n1)"
24
+ fi
25
+ if [ -z "${UPM_BIN}" ]; then
26
+ echo "::error::Could not locate the 'upm' binary after install." >&2
27
+ exit 1
28
+ fi
29
+
30
+ "${UPM_BIN}" --version
31
+
32
+ # Packs the package in the repo root and writes the SIGNED tarball to ./dist.
33
+ # Service account must hold the "Package Manager Package Signer" role.
34
+ "${UPM_BIN}" pack . --organization-id "${UNITY_ORGANIZATION_ID}" --destination ./dist
35
+
36
+ TARBALL="$(ls ./dist/*.tgz | head -n1)"
37
+ echo "Publishing ${TARBALL} on dist-tag ${TAG}"
38
+ npm publish "${TARBALL}" --access public --provenance --tag "${TAG}"
@@ -3,11 +3,12 @@ name: "🚀 publish"
3
3
  on:
4
4
  push:
5
5
  branches:
6
- - main
6
+ - main
7
+ - "prerelease/*"
7
8
 
8
9
  permissions:
9
- id-token: write # Required for npm OIDC and Provenance
10
- contents: read
10
+ id-token: write # Required for npm OIDC and Provenance
11
+ contents: write # Tag, release commit, and GitHub release
11
12
 
12
13
  jobs:
13
14
  release:
@@ -16,6 +17,8 @@ jobs:
16
17
  steps:
17
18
  - name: 📚 checkout
18
19
  uses: actions/checkout@v6
20
+ with:
21
+ fetch-depth: 0
19
22
 
20
23
  - name: 🟢 node
21
24
  uses: actions/setup-node@v6
@@ -23,40 +26,31 @@ jobs:
23
26
  node-version: 24
24
27
  registry-url: https://registry.npmjs.org
25
28
 
26
- # --- Pack & sign with Unity's official Package Manager CLI ---
27
- # https://docs.unity3d.com/6000.3/Documentation/Manual/upm-cli.html
28
- # Service account must hold the "Package Manager Package Signer" role.
29
- - name: 🔏 pack & sign unity package
30
- env:
31
- UPM_SERVICE_ACCOUNT_KEY_ID: ${{ secrets.UPM_SERVICE_ACCOUNT_KEY_ID }}
32
- UPM_SERVICE_ACCOUNT_KEY_SECRET: ${{ secrets.UPM_SERVICE_ACCOUNT_KEY_SECRET }}
33
- UNITY_ORGANIZATION_ID: ${{ secrets.UNITY_ORG_ID }}
29
+ - name: 🔐 git identity
34
30
  run: |
35
- set -euo pipefail
36
-
37
- # Install the official UPM CLI (adds `upm` to PATH via shell profile,
38
- # which a non-interactive CI shell does NOT pick up — so resolve the
39
- # binary directly below).
40
- curl -fsSL https://cdn.packages.unity.com/upm-cli/install.sh | bash
41
-
42
- UPM_BIN="$(command -v upm || true)"
43
- if [ -z "${UPM_BIN}" ]; then
44
- UPM_BIN="$(find "${HOME}" -type f -name upm 2>/dev/null | head -n1)"
45
- fi
46
- if [ -z "${UPM_BIN}" ]; then
47
- echo "::error::Could not locate the 'upm' binary after install." >&2
48
- exit 1
49
- fi
31
+ git config user.name "github-actions[bot]"
32
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
50
33
 
51
- "${UPM_BIN}" --version
52
-
53
- # Packs the package in the repo root and writes the SIGNED tarball to ./dist
54
- "${UPM_BIN}" pack . --organization-id "${UNITY_ORGANIZATION_ID}" --destination ./dist
55
-
56
- # --- Publish the SIGNED tarball (do NOT let npm repack the source) ---
57
- - name: 🚀 publish
34
+ - name: 📦 semantic-release
35
+ env:
36
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37
+ UPM_SERVICE_ACCOUNT_KEY_ID: ${{ secrets.UPM_SERVICE_ACCOUNT_KEY_ID }}
38
+ UPM_SERVICE_ACCOUNT_KEY_SECRET: ${{ secrets.UPM_SERVICE_ACCOUNT_KEY_SECRET }}
39
+ UNITY_ORGANIZATION_ID: ${{ secrets.UNITY_ORG_ID }}
58
40
  run: |
59
- set -euo pipefail
60
- TARBALL="$(ls ./dist/*.tgz | head -n1)"
61
- echo "Publishing ${TARBALL}"
62
- npm publish "${TARBALL}" --access public --provenance
41
+ set -euo pipefail
42
+ # Install outside the Unity package. `npm install` in the repo
43
+ # root would try to fetch package.json dependencies such as
44
+ # com.unity.inputsystem from the npm registry.
45
+ INSTALL_DIR="${RUNNER_TEMP}/semantic-release"
46
+ mkdir -p "${INSTALL_DIR}"
47
+ npm install --prefix "${INSTALL_DIR}" --no-package-lock \
48
+ semantic-release@25.0.5 \
49
+ @semantic-release/commit-analyzer@13.0.1 \
50
+ @semantic-release/release-notes-generator@14.1.1 \
51
+ @semantic-release/npm@12.0.2 \
52
+ @semantic-release/github@11.0.6 \
53
+ @semantic-release/git@10.0.1 \
54
+ @semantic-release/exec@7.1.0 \
55
+ conventional-changelog-conventionalcommits@8.0.0
56
+ "${INSTALL_DIR}/node_modules/.bin/semantic-release"
@@ -0,0 +1,71 @@
1
+ {
2
+ "branches": [
3
+ "main",
4
+ {
5
+ "name": "prerelease/*",
6
+ "channel": "${name.replace(/^prerelease\\//g, '')}",
7
+ "prerelease": "${name.replace(/^prerelease\\//g, '')}"
8
+ }
9
+ ],
10
+ "plugins": [
11
+ [
12
+ "@semantic-release/commit-analyzer",
13
+ {
14
+ "preset": "angular",
15
+ "releaseRules": [
16
+ { "breaking": true, "release": "major" },
17
+ { "type": "feat", "release": "minor" },
18
+ { "type": "fix", "release": "patch" },
19
+ { "type": "chore", "release": "patch" }
20
+ ],
21
+ "parserOpts": {
22
+ "noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES"]
23
+ }
24
+ }
25
+ ],
26
+ [
27
+ "@semantic-release/release-notes-generator",
28
+ {
29
+ "preset": "conventionalcommits",
30
+ "presetConfig": {
31
+ "types": [
32
+ { "type": "feat", "section": "Features" },
33
+ { "type": "fix", "section": "Bug Fixes" },
34
+ { "type": "chore", "section": "Miscellaneous Chores" }
35
+ ]
36
+ },
37
+ "parserOpts": {
38
+ "noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES"]
39
+ }
40
+ }
41
+ ],
42
+ [
43
+ "@semantic-release/npm",
44
+ {
45
+ "npmPublish": false
46
+ }
47
+ ],
48
+ [
49
+ "@semantic-release/git",
50
+ {
51
+ "assets": ["package.json"],
52
+ "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
53
+ }
54
+ ],
55
+ [
56
+ "@semantic-release/exec",
57
+ {
58
+ "publishCmd": "bash .github/publish-unity.sh \"${nextRelease.channel}\""
59
+ }
60
+ ],
61
+ [
62
+ "@semantic-release/github",
63
+ {
64
+ "successComment": false,
65
+ "failComment": false,
66
+ "failTitle": false,
67
+ "labels": false
68
+ }
69
+ ]
70
+ ]
71
+ }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "fr.jeanf.eventsystem",
3
- "version": "0.3.2",
3
+ "version": "0.3.3-alpha.1",
4
4
  "displayName": "Event System",
5
5
  "description": "This package contains a basic Event System based on Scriptable Objects as communication medium",
6
6
  "unity": "2021.3",
7
7
  "repository": {
8
8
  "url": "https://github.com/lejeanf/EventSystem",
9
9
  "type": "git",
10
- "revision": "6bccfa21afba2ac213ddd5e1e6e86d375f7f6808"
10
+ "revision": "5015996286c2fb37419934be4f34d7ebe4ee0b14"
11
11
  },
12
12
  "keywords": [
13
13
  "jeanf",