Skip to content

Commit 9bfde65

Browse files
committed
Added sign and release workflow; updated version in package.json; updated changelog
1 parent 05d43d4 commit 9bfde65

4 files changed

Lines changed: 83 additions & 5 deletions

File tree

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Sign and release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
sign:
13+
name: Sign UPM package
14+
runs-on: ubuntu-latest
15+
env:
16+
UPM_SERVICE_ACCOUNT_KEY_ID: ${{ secrets.UPM_SERVICE_ACCOUNT_KEY_ID }}
17+
UPM_SERVICE_ACCOUNT_KEY_SECRET: ${{ secrets.UPM_SERVICE_ACCOUNT_KEY_SECRET }}
18+
UPM_ORG_ID: ${{ secrets.UPM_ORG_ID }}
19+
DIST_DIR: /tmp/signed-upm-dist
20+
21+
steps:
22+
- name: Check out repository
23+
uses: actions/checkout@v4
24+
25+
- name: Read package metadata
26+
run: |
27+
package_name="$(jq -r '.name' package.json)"
28+
package_version="$(jq -r '.version' package.json)"
29+
30+
echo "PACKAGE_NAME=$package_name" >> "$GITHUB_ENV"
31+
echo "PACKAGE_VERSION=$package_version" >> "$GITHUB_ENV"
32+
33+
printf 'Package name: %s\n' "$package_name"
34+
printf 'Package version: %s\n' "$package_version"
35+
36+
- name: Install Unity UPM CLI
37+
run: |
38+
curl -fsSL https://cdn.packages.unity.com/upm-cli/install.sh -o install.sh
39+
bash install.sh
40+
echo "$HOME/.upm/bin" >> "$GITHUB_PATH"
41+
42+
- name: Verify Unity UPM CLI
43+
run: upm --help
44+
45+
- name: Sign package
46+
run: |
47+
mkdir -p "$DIST_DIR"
48+
upm pack . --organization-id "$UPM_ORG_ID" --destination "$DIST_DIR"
49+
50+
- name: Print signed package info
51+
run: |
52+
shopt -s nullglob
53+
archives=("$DIST_DIR"/*.tgz "$DIST_DIR"/*.tar.gz)
54+
if [ "${#archives[@]}" -ne 1 ]; then
55+
printf 'Expected exactly one signed package archive, found %s\n' "${#archives[@]}" >&2
56+
exit 1
57+
fi
58+
59+
archive="${archives[0]}"
60+
tar -tzf "$archive" | grep -qx 'package/package.json'
61+
tar -tzf "$archive" | grep -qx 'package/.attestation.p7m'
62+
63+
echo "PACKAGE_ARCHIVE=$archive" >> "$GITHUB_ENV"
64+
printf 'Archive: %s\n' "$(basename "$archive")"
65+
tar -xOzf "$archive" package/package.json | jq '{name, version}'
66+
67+
- name: Create GitHub Release
68+
uses: softprops/action-gh-release@v2
69+
with:
70+
files: |
71+
/tmp/signed-upm-dist/*.tgz
72+
/tmp/signed-upm-dist/*.tar.gz

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.0.4] - 2026-05-18
9+
10+
### Security
11+
12+
- Added sign and release workflow to sign and release an UPM package when a Git tag is pushed.
13+
814
## [1.0.3] - 2024-12-27
915

1016
### Changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This package includes a locale selector that uses the Steam client language to s
1010

1111
This package depends on the following packages:
1212

13-
* [Localization](https://openupm.com/packages/com.audune.localization/), version **3.0.0** or higher.
13+
* [Localization](https://openupm.com/packages/com.audune.localization/), version **3.1.1** or higher.
1414
* [Steamworks.NET](https://openupm.com/packages/com.rlabrecque.steamworks.net/), version **20.0.0** or higher.
1515

1616
If you're installing the required packages from the [OpenUPM registry](https://openupm.com/), make sure to add a scoped registry with the URL `https://package.openupm.com` and the required scopes before installing the packages.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
22
"name": "com.audune.localization.steam",
33
"displayName": "Steam Localization Integration",
4-
"version": "1.0.3",
4+
"version": "1.0.4",
55
"unity": "2022.3",
66
"description": "Steam localization integration for the Audune Localization package",
77
"documentationUrl": "https://github.com/audunegames/steam-localization-integration",
88
"changelogUrl": "https://github.com/audunegames/steam-localization-integration/tree/master/CHANGELOG.md",
99
"licensesUrl": "https://www.gnu.org/licenses/lgpl-3.0.html",
10-
"license": "GPL-3.0-or-later",
10+
"license": "LGPL-3.0-or-later",
1111
"author": {
12-
"name": "Audune Games",
12+
"name": "Audune",
1313
"email": "support@audune.com",
1414
"url": "https://audune.com/"
1515
},
1616
"dependencies": {
17-
"com.audune.localization": "3.0.1",
17+
"com.audune.localization": "3.1.1",
1818
"com.rlabrecque.steamworks.net": "20.0.0"
1919
}
2020
}

0 commit comments

Comments
 (0)