@tf2pickup-org/mumble-protocol 1.0.9 → 1.0.11
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/auto-release.yml +137 -0
- package/.github/workflows/publish.yml +1 -1
- package/.github/workflows/release.yml +43 -0
- package/CHANGELOG.md +15 -0
- package/dist/Mumble.d.ts +183 -183
- package/dist/Mumble.js +75 -75
- package/dist/Mumble.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
|
@@ -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@v4
|
|
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@v4
|
|
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."
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: Release new version
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
env:
|
|
7
|
+
NODE_VERSION: 20.x
|
|
8
|
+
GITHUB_TOKEN: ${{ secrets.RELEASE_IT_TOKEN }}
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
release:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: write
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
with:
|
|
21
|
+
fetch-depth: 0
|
|
22
|
+
|
|
23
|
+
- name: Setup pnpm
|
|
24
|
+
uses: pnpm/action-setup@v4
|
|
25
|
+
with:
|
|
26
|
+
version: 10
|
|
27
|
+
|
|
28
|
+
- name: Use Node.js ${{ env.NODE_VERSION }}
|
|
29
|
+
uses: actions/setup-node@v4
|
|
30
|
+
with:
|
|
31
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
32
|
+
cache: pnpm
|
|
33
|
+
|
|
34
|
+
- name: Install dependencies
|
|
35
|
+
run: pnpm install
|
|
36
|
+
|
|
37
|
+
- name: Set git identity
|
|
38
|
+
run: |
|
|
39
|
+
git config user.name "release bot"
|
|
40
|
+
git config user.email "release-bot@users.noreply.github.com"
|
|
41
|
+
|
|
42
|
+
- name: Release
|
|
43
|
+
run: pnpm exec release-it --ci
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.11](https://github.com/tf2pickup-org/mumble-protocol/compare/1.0.10...1.0.11) (2025-06-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **deps:** update dependency @protobuf-ts/runtime to v2.11.0 ([8d528ae](https://github.com/tf2pickup-org/mumble-protocol/commit/8d528ae2a66e6453faf62a87f52cac579a854b53))
|
|
9
|
+
* **deps:** update dependency @protobuf-ts/runtime to v2.11.1 ([a194982](https://github.com/tf2pickup-org/mumble-protocol/commit/a1949829557ac665155e682d09b90a11712fe311))
|
|
10
|
+
|
|
11
|
+
## [1.0.10](https://github.com/tf2pickup-org/mumble-protocol/compare/1.0.9...1.0.10) (2025-05-07)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **deps:** update dependency @protobuf-ts/runtime to v2.10.0 ([5deab42](https://github.com/tf2pickup-org/mumble-protocol/commit/5deab42d8d8ce326e448fdcc5cac1ff56b6fdbe1))
|
|
17
|
+
|
|
3
18
|
## [1.0.9](https://github.com/tf2pickup-org/mumble-protocol/compare/1.0.8...1.0.9) (2025-03-29)
|
|
4
19
|
|
|
5
20
|
|