Skip to content

Commit a465b7b

Browse files
authored
Initial changeset setup (#77)
* Initial changeset setup * changeset test ci * fixes
1 parent 73db235 commit a465b7b

File tree

8 files changed

+1189
-1
lines changed

8 files changed

+1189
-1
lines changed

.changeset/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/bright-boats-fly.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"server-sdk-kotlin": minor
3+
---
4+
5+
Allow updating participant attributes with updateParticipant

.changeset/config.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": [
4+
"@livekit/changesets-changelog-github",
5+
{ "repo": "livekit/noise-filter-js" }
6+
],
7+
"commit": false,
8+
"fixed": [],
9+
"linked": [],
10+
"access": "public",
11+
"baseBranch": "main",
12+
"updateInternalDependencies": "patch",
13+
"ignore": [],
14+
"privatePackages": { "version": true, "tag": true }
15+
}

.github/workflows/changeset.yml

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Changeset action
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
concurrency: ${{ github.workflow }}-${{ github.ref }}
10+
11+
jobs:
12+
release:
13+
name: Release
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout Repo
18+
uses: actions/checkout@v4
19+
20+
- uses: pnpm/action-setup@v2
21+
with:
22+
version: 9
23+
24+
- name: Use Node.js 20
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 20
28+
cache: "pnpm"
29+
30+
- name: Install dependencies
31+
run: pnpm install
32+
33+
- name: Create Release Pull Request
34+
id: changesets
35+
uses: changesets/action@v1
36+
with:
37+
version: pnpm ci:version
38+
publish: pnpm ci:publish
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.CHANGESET_GH_TOKEN }}
41+
outputs:
42+
hasPublishedKotlin: ${{ steps.changesets.outputs.published == 'true' && contains(fromJson(steps.changesets.outputs.publishedPackages).*.name, 'kotlin') }}
43+
44+
debug-outputs:
45+
needs: release
46+
name: Debug
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: "echo outputs"
50+
run: |
51+
echo ${{ needs.release.outputs.hasPublishedKotlin }}
52+
53+
publish-kotlin:
54+
needs: release
55+
name: Publish Android
56+
if: ${{ needs.release.outputs.hasPublishedKotlin == 'true' }}
57+
runs-on: ubuntu-latest
58+
defaults:
59+
run:
60+
working-directory: ./server-sdk-kotlin
61+
62+
steps:
63+
- name: checkout server-sdk-kotlin
64+
uses: actions/checkout@v3
65+
with:
66+
path: ./server-sdk-kotlin
67+
submodules: recursive
68+
69+
- name: set up JDK 12
70+
uses: actions/setup-java@v2
71+
with:
72+
java-version: '12'
73+
distribution: 'adopt'
74+
75+
- name: Grant execute permission for gradlew
76+
run: chmod +x gradlew
77+
78+
- name: Build with Gradle
79+
run: ./gradlew assemble
80+
81+
- name: Create gpg key and import into gradle properties
82+
run: |
83+
echo $GPG_KEY_ARMOR | base64 --decode > ./release.asc
84+
gpg --quiet --output $GITHUB_WORKSPACE/release.gpg --dearmor ./release.asc
85+
sed -i -e "s,nexusUsername=,nexusUsername=$NEXUS_USERNAME,g" gradle.properties
86+
sed -i -e "s,nexusPassword=,nexusPassword=$NEXUS_PASSWORD,g" gradle.properties
87+
sed -i -e "s,signing.keyId=,signing.keyId=$GPG_KEY_ID,g" gradle.properties
88+
sed -i -e "s,signing.password=,signing.password=$GPG_PASSWORD,g" gradle.properties
89+
sed -i -e "s,signing.secretKeyRingFile=,signing.secretKeyRingFile=$GITHUB_WORKSPACE/release.gpg,g" gradle.properties
90+
env:
91+
GPG_KEY_ARMOR: "${{ secrets.SIGNING_KEY_ARMOR }}"
92+
GPG_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
93+
GPG_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
94+
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
95+
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
96+
97+
- name: Publish to sonatype
98+
run: ./gradlew publish
99+
100+
# - name: Close and release to maven
101+
# run: ./gradlew closeAndReleaseRepository

.gitignore

+7-1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,10 @@ bin/
4444
.vscode/
4545

4646
### Mac OS ###
47-
.DS_Store
47+
.DS_Store
48+
49+
### Yarn
50+
node_modules/
51+
npm-debug.log
52+
yarn-debug.log
53+
yarn-error.log

package.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "server-sdk-kotlin",
3+
"version": "0.6.2",
4+
"main": "index.js",
5+
"repository": "[email protected]:livekit/server-sdk-kotlin.git",
6+
"author": "[email protected]",
7+
"license": "Apache License 2.0",
8+
"private": true,
9+
"devDependencies": {
10+
"@changesets/cli": "^2.27.7",
11+
"@livekit/changesets-changelog-github": "^0.0.4"
12+
},
13+
"scripts": {
14+
"changeset": "changeset",
15+
"ci:publish": "changeset publish",
16+
"ci:version": "changeset version && ./scripts/update_android_gradle_version.sh"
17+
}
18+
}

0 commit comments

Comments
 (0)