@tf2pickup-org/mumble-protocol 1.0.10 → 1.0.12

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.
@@ -0,0 +1,137 @@
1
+ name: Automatic Dependency Release
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "0 3 * * *"
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: write
10
+
11
+ env:
12
+ GITHUB_TOKEN: ${{ secrets.RELEASE_IT_TOKEN }}
13
+
14
+ jobs:
15
+ check-and-release:
16
+ runs-on: ubuntu-latest
17
+ if: github.ref == 'refs/heads/master'
18
+
19
+ steps:
20
+ - name: Checkout code
21
+ uses: actions/checkout@v6
22
+ with:
23
+ fetch-depth: 0
24
+ persist-credentials: true
25
+
26
+ - name: Setup pnpm
27
+ uses: pnpm/action-setup@v4
28
+ with:
29
+ version: 10
30
+
31
+ - name: Set up Node.js
32
+ uses: actions/setup-node@v6
33
+ with:
34
+ node-version: "lts/*"
35
+ cache: pnpm
36
+
37
+ - name: Install dependencies
38
+ run: pnpm install
39
+
40
+ - name: Configure Git User
41
+ run: |
42
+ git config user.name "${{ github.actor }}"
43
+ git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
44
+
45
+ - name: Check release conditions
46
+ id: check_conditions
47
+ env:
48
+ RENOVATE_AUTHOR_EMAIL: "29139614+renovate[bot]@users.noreply.github.com"
49
+ run: |
50
+ echo "Checking conditions for automated release..."
51
+ SHOULD_RELEASE="false"
52
+
53
+ # Get the latest tag. Handle the case where no tags exist yet (first release).
54
+ LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
55
+ COMMIT_RANGE="" # Define the range of commits to check
56
+
57
+ if [ -z "$LATEST_TAG" ]; then
58
+ echo "No previous tag found. Checking all commits on the current branch."
59
+ # If no tag, check all commits reachable from HEAD
60
+ COMMIT_RANGE="HEAD"
61
+ else
62
+ echo "Last tag found: $LATEST_TAG. Checking commits since then."
63
+ # If tag exists, check commits between the tag and HEAD
64
+ COMMIT_RANGE="$LATEST_TAG..HEAD"
65
+ fi
66
+
67
+ # Get commits since the last tag (or all commits if no tag), excluding merge commits.
68
+ # Format: HASH <commit_author_email> s:SUBJECT
69
+ COMMITS_SINCE_TAG=$(git log $COMMIT_RANGE --pretty=format:'%H <%ae> s:%s' --no-merges)
70
+
71
+ if [ -z "$COMMITS_SINCE_TAG" ]; then
72
+ echo "No new non-merge commits found since last tag ($LATEST_TAG). No release needed."
73
+ else
74
+ echo "Commits since last tag ($LATEST_TAG):"
75
+ echo "$COMMITS_SINCE_TAG"
76
+
77
+ # Count the total number of non-merge commits in the range
78
+ TOTAL_COMMITS=$(echo "$COMMITS_SINCE_TAG" | wc -l)
79
+
80
+ # Count commits made specifically by the Renovate bot (matching email AND semantic prefix 'chore(deps):' or 'fix(deps):')
81
+ RENOVATE_COMMITS=$(echo "$COMMITS_SINCE_TAG" | grep -E "<$RENOVATE_AUTHOR_EMAIL> s:(chore\(deps\)|fix\(deps\)):" | wc -l)
82
+
83
+ echo "Total non-merge commits: $TOTAL_COMMITS"
84
+ echo "Renovate dependency commits: $RENOVATE_COMMITS"
85
+
86
+ # Condition 1: ALL commits must be from Renovate (either chore or fix)
87
+ if [ "$TOTAL_COMMITS" -eq "$RENOVATE_COMMITS" ] && [ "$TOTAL_COMMITS" -gt 0 ]; then
88
+ echo "All $TOTAL_COMMITS commit(s) since last tag are Renovate dependency commits"
89
+
90
+ # Condition 2: At least one of these Renovate commits must have modified package.json AND be a production dependency update
91
+ # We use the 'fix(deps):' prefix as a heuristic for production dependency updates, based on common Renovate semantic commit configurations.
92
+ COMMITS_TOUCHING_PACKAGE_JSON=$(git log $COMMIT_RANGE --pretty=format:%H -- package.json)
93
+
94
+ PROD_DEP_UPDATE_FOUND="false" # Flag to track if a relevant production dependency update was found
95
+
96
+ if [ -n "$COMMITS_TOUCHING_PACKAGE_JSON" ]; then
97
+ echo "Checking Renovate commits that modified package.json for 'fix(deps):' prefix..."
98
+ # Iterate through commits that touched package.json
99
+ while IFS= read -r commit_hash; do
100
+ # Get the author email and subject for the specific commit hash
101
+ commit_info=$(git show --no-patch --pretty=format:'%ae s:%s' $commit_hash)
102
+ # Check if this commit matches the Renovate author email AND starts with 'fix(deps):'
103
+ if echo "$commit_info" | grep -q -E "^$RENOVATE_AUTHOR_EMAIL s:fix\(deps\):"; then
104
+ echo "Found Renovate commit ($commit_hash) with 'fix(deps):' prefix that modified package.json"
105
+ PROD_DEP_UPDATE_FOUND="true"
106
+ break
107
+ fi
108
+ done <<< "$COMMITS_TOUCHING_PACKAGE_JSON"
109
+ else
110
+ echo "No commits modified package.json in this range"
111
+ fi
112
+
113
+ # Final check: Release only if a production dependency update was found
114
+ if [ "$PROD_DEP_UPDATE_FOUND" = "true" ]; then
115
+ echo "At least one Renovate commit with 'fix(deps):' prefix modified package.json"
116
+ echo "All conditions met for automated release"
117
+ SHOULD_RELEASE="true"
118
+ else
119
+ echo "Although all commits were from Renovate, none modifying package.json had the 'fix(deps):' prefix (or none modified package.json). Assuming no production dependency update. No release needed"
120
+ fi
121
+ else
122
+ echo "Not all commits since the last tag are Renovate dependency commits (or there are no new commits). Human commits might be present. No automated release"
123
+ fi
124
+ fi
125
+
126
+ # Set the output variable for use in subsequent steps
127
+ echo "should_release=$SHOULD_RELEASE" >> $GITHUB_OUTPUT
128
+
129
+ - name: Release new version
130
+ if: steps.check_conditions.outputs.should_release == 'true'
131
+ run: |
132
+ echo "Conditions met. Triggering release..."
133
+ pnpm exec release-it --ci
134
+
135
+ - name: Release skipped
136
+ if: steps.check_conditions.outputs.should_release == 'false'
137
+ run: echo "Conditions for automated release were not met. Skipping release."
@@ -24,15 +24,15 @@ jobs:
24
24
 
25
25
  steps:
26
26
  - name: Checkout repository
27
- uses: actions/checkout@v4
27
+ uses: actions/checkout@v6
28
28
 
29
29
  - name: Setup pnpm
30
30
  uses: pnpm/action-setup@v4
31
31
  with:
32
- version: 8
32
+ version: 10
33
33
 
34
34
  - name: Use Node.js ${{ matrix.node-version }}
35
- uses: actions/setup-node@v4
35
+ uses: actions/setup-node@v6
36
36
  with:
37
37
  node-version: ${{ matrix.node-version }}
38
38
  cache: pnpm
@@ -8,23 +8,30 @@ jobs:
8
8
  build:
9
9
  runs-on: ubuntu-latest
10
10
 
11
+ permissions:
12
+ contents: read
13
+ id-token: write
14
+
11
15
  steps:
12
16
  - name: Checkout repository
13
- uses: actions/checkout@v4
17
+ uses: actions/checkout@v6
14
18
 
15
19
  - name: Setup pnpm
16
20
  uses: pnpm/action-setup@v4
17
21
  with:
18
- version: 8
22
+ version: 10
19
23
 
20
24
  - name: Setup Node.js
21
- uses: actions/setup-node@v4
25
+ uses: actions/setup-node@v6
22
26
  with:
23
- node-version: 22.x
27
+ node-version: 24.x
24
28
  cache: pnpm
25
29
  registry-url: "https://registry.npmjs.org"
26
30
  scope: "@tf2pickup-org"
27
31
 
32
+ - name: Upgrade npm for trusted publishing
33
+ run: npm install -g npm@latest
34
+
28
35
  - name: Install dependencies
29
36
  run: pnpm install
30
37
 
@@ -38,6 +45,4 @@ jobs:
38
45
  run: pnpm build
39
46
 
40
47
  - name: Publish
41
- run: pnpm publish --access public --no-git-checks
42
- env:
43
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
48
+ run: pnpm publish --access public --no-git-checks --provenance
@@ -16,7 +16,7 @@ jobs:
16
16
 
17
17
  steps:
18
18
  - name: Checkout
19
- uses: actions/checkout@v4
19
+ uses: actions/checkout@v6
20
20
  with:
21
21
  fetch-depth: 0
22
22
 
@@ -26,7 +26,7 @@ jobs:
26
26
  version: 10
27
27
 
28
28
  - name: Use Node.js ${{ env.NODE_VERSION }}
29
- uses: actions/setup-node@v4
29
+ uses: actions/setup-node@v6
30
30
  with:
31
31
  node-version: ${{ env.NODE_VERSION }}
32
32
  cache: pnpm
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.0.12](https://github.com/tf2pickup-org/mumble-protocol/compare/1.0.11...1.0.12) (2026-02-13)
4
+
5
+ ## [1.0.11](https://github.com/tf2pickup-org/mumble-protocol/compare/1.0.10...1.0.11) (2025-06-23)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **deps:** update dependency @protobuf-ts/runtime to v2.11.0 ([8d528ae](https://github.com/tf2pickup-org/mumble-protocol/commit/8d528ae2a66e6453faf62a87f52cac579a854b53))
11
+ * **deps:** update dependency @protobuf-ts/runtime to v2.11.1 ([a194982](https://github.com/tf2pickup-org/mumble-protocol/commit/a1949829557ac665155e682d09b90a11712fe311))
12
+
3
13
  ## [1.0.10](https://github.com/tf2pickup-org/mumble-protocol/compare/1.0.9...1.0.10) (2025-05-07)
4
14
 
5
15