Skip to content

Commit b094168

Browse files
committed
Merge branch 'livekit' into fkwp/elementregistry
2 parents 164e620 + 41f7b64 commit b094168

35 files changed

Lines changed: 1153 additions & 276 deletions

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!-- Thanks for submitting a PR! Please ensure the following requirements are met in order for us to review your PR -->
2+
3+
## Content
4+
5+
<!-- Describe shortly what has been changed -->
6+
7+
## Motivation and context
8+
9+
<!-- Provide link to the corresponding issue if applicable or explain the context -->
10+
11+
## Screenshots / GIFs
12+
13+
<!--
14+
15+
You can use a table like this to show screenshots comparison.
16+
Uncomment this markdown table below and edit the last line `|||`:
17+
|copy screenshot of before here|copy screenshot of after here|
18+
19+
|Before|After|
20+
|-|-|
21+
|||
22+
-->
23+
24+
## Tests
25+
26+
<!-- Explain how you tested your development -->
27+
28+
- Step 1
29+
- Step 2
30+
- Step ...
31+
-
32+
33+
## Checklist
34+
35+
- [ ] I have read through [CONTRIBUTING.md](https://github.com/element-hq/element-call/blob/livekit/CONTRIBUTING.md).
36+
- [ ] Pull request includes screenshots or videos if containing UI changes
37+
- [ ] Tests written for new code (and old code if feasible).
38+
- [ ] Linter and other CI checks pass.
39+
- [ ] I have licensed the changes to Element by completing the [Contributor License Agreement (CLA)](https://cla-assistant.io/element-hq/element-call)

.github/workflows/build-and-publish-docker.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
steps:
2626
- name: Check it out
2727
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
28+
with:
29+
persist-credentials: false
2830

2931
- name: 📥 Download artifact
3032
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4

.github/workflows/build-element-call.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
steps:
3434
- name: Checkout code
3535
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
36+
with:
37+
persist-credentials: false
3638
- name: Enable Corepack
3739
run: corepack enable
3840
- name: Yarn cache

.github/workflows/deploy-to-netlify.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,15 @@ jobs:
6363

6464
- name: Add config file
6565
run: |
66-
if [ "${{ inputs.package }}" = "full" ]; then
67-
curl -s "https://raw.githubusercontent.com/${{ inputs.pr_head_full_name }}/${{ inputs.pr_head_ref }}/config/config_netlify_preview.json" > webapp/config.json
66+
if [ "${INPUTS_PACKAGE}" = "full" ]; then
67+
curl -s "https://raw.githubusercontent.com/${INPUTS_PR_HEAD_FULL_NAME}/${INPUTS_PR_HEAD_REF}/config/config_netlify_preview.json" > webapp/config.json
6868
else
69-
curl -s "https://raw.githubusercontent.com/${{ inputs.pr_head_full_name }}/${{ inputs.pr_head_ref }}/config/config_netlify_preview_sdk.json" > webapp/config.json
69+
curl -s "https://raw.githubusercontent.com/${INPUTS_PR_HEAD_FULL_NAME}/${INPUTS_PR_HEAD_REF}/config/config_netlify_preview_sdk.json" > webapp/config.json
7070
fi
71+
env:
72+
INPUTS_PACKAGE: ${{ inputs.package }}
73+
INPUTS_PR_HEAD_FULL_NAME: ${{ inputs.pr_head_full_name }}
74+
INPUTS_PR_HEAD_REF: ${{ inputs.pr_head_ref }}
7175
- name: ☁️ Deploy to Netlify
7276
id: netlify
7377
uses: nwtgck/actions-netlify@4cbaf4c08f1a7bfa537d6113472ef4424e4eb654 # v3.0

.github/workflows/lint.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ jobs:
88
steps:
99
- name: Checkout code
1010
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
11+
with:
12+
persist-credentials: false
1113
- name: Enable Corepack
1214
run: corepack enable
1315
- name: Yarn cache

.github/workflows/publish-embedded-packages.yaml

Lines changed: 47 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ jobs:
7171
contents: write # required to upload release asset
7272
steps:
7373
- name: Determine filename
74-
run: echo "FILENAME_PREFIX=element-call-embedded-${{ needs.versioning.outputs.UNPREFIXED_VERSION }}" >> "$GITHUB_ENV"
74+
run: echo "FILENAME_PREFIX=element-call-embedded-${NEEDS_VERSIONING_OUTPUTS_UNPREFIXED_VERSION}" >> "$GITHUB_ENV"
75+
env:
76+
NEEDS_VERSIONING_OUTPUTS_UNPREFIXED_VERSION: ${{ needs.versioning.outputs.UNPREFIXED_VERSION }}
7577
- name: 📥 Download built element-call artifact
7678
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
7779
with:
@@ -80,9 +82,9 @@ jobs:
8082
name: build-output-embedded
8183
path: ${{ env.FILENAME_PREFIX}}
8284
- name: Create Tarball
83-
run: tar --numeric-owner -cvzf ${{ env.FILENAME_PREFIX }}.tar.gz ${{ env.FILENAME_PREFIX }}
85+
run: tar --numeric-owner -cvzf ${FILENAME_PREFIX}.tar.gz ${FILENAME_PREFIX}
8486
- name: Create Checksum
85-
run: find ${{ env.FILENAME_PREFIX }} -type f -print0 | sort -z | xargs -0 sha256sum | tee ${{ env.FILENAME_PREFIX }}.sha256
87+
run: find ${FILENAME_PREFIX} -type f -print0 | sort -z | xargs -0 sha256sum | tee ${FILENAME_PREFIX}.sha256
8688
- name: Upload
8789
if: ${{ needs.versioning.outputs.DRY_RUN == 'false' }}
8890
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2
@@ -104,6 +106,8 @@ jobs:
104106
steps:
105107
- name: Checkout
106108
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
109+
with:
110+
persist-credentials: false
107111

108112
- name: 📥 Download built element-call artifact
109113
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
@@ -123,13 +127,16 @@ jobs:
123127
- name: Publish npm
124128
working-directory: embedded/web
125129
run: |
126-
npm version ${{ needs.versioning.outputs.PREFIXED_VERSION }} --no-git-tag-version
130+
npm version ${NEEDS_VERSIONING_OUTPUTS_PREFIXED_VERSION} --no-git-tag-version
127131
echo "ARTIFACT_VERSION=$(jq '.version' --raw-output package.json)" >> "$GITHUB_ENV"
128-
npm publish --provenance --access public --tag ${{ needs.versioning.outputs.TAG }} ${{ needs.versioning.outputs.DRY_RUN == 'true' && '--dry-run' || '' }}
132+
npm publish --provenance --access public --tag ${NEEDS_VERSIONING_OUTPUTS_TAG} ${{ needs.versioning.outputs.DRY_RUN == 'true' && '--dry-run' || '' }}
133+
env:
134+
NEEDS_VERSIONING_OUTPUTS_PREFIXED_VERSION: ${{ needs.versioning.outputs.PREFIXED_VERSION }}
135+
NEEDS_VERSIONING_OUTPUTS_TAG: ${{ needs.versioning.outputs.TAG }}
129136

130137
- id: artifact_version
131138
name: Output artifact version
132-
run: echo "ARTIFACT_VERSION=${{env.ARTIFACT_VERSION}}" >> "$GITHUB_OUTPUT"
139+
run: echo "ARTIFACT_VERSION=${ARTIFACT_VERSION}" >> "$GITHUB_OUTPUT"
133140

134141
publish_android:
135142
needs: [build_element_call, versioning]
@@ -143,6 +150,8 @@ jobs:
143150
steps:
144151
- name: Checkout
145152
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
153+
with:
154+
persist-credentials: false
146155

147156
- name: 📥 Download built element-call artifact
148157
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
@@ -161,16 +170,19 @@ jobs:
161170
- name: Get artifact version
162171
# Anything that is not a final release will be tagged as a snapshot
163172
run: |
164-
if [[ "${{ needs.versioning.outputs.TAG }}" == "latest" ]]; then
165-
echo "ARTIFACT_VERSION=${{ needs.versioning.outputs.UNPREFIXED_VERSION }}" >> "$GITHUB_ENV"
166-
elif [[ "${{ needs.versioning.outputs.TAG }}" == "rc" ]]; then
167-
echo "ARTIFACT_VERSION=${{ needs.versioning.outputs.UNPREFIXED_VERSION }}" >> "$GITHUB_ENV"
173+
if [[ "${NEEDS_VERSIONING_OUTPUTS_TAG}" == "latest" ]]; then
174+
echo "ARTIFACT_VERSION=${NEEDS_VERSIONING_OUTPUTS_UNPREFIXED_VERSION}" >> "$GITHUB_ENV"
175+
elif [[ "${NEEDS_VERSIONING_OUTPUTS_TAG}" == "rc" ]]; then
176+
echo "ARTIFACT_VERSION=${NEEDS_VERSIONING_OUTPUTS_UNPREFIXED_VERSION}" >> "$GITHUB_ENV"
168177
else
169-
echo "ARTIFACT_VERSION=${{ needs.versioning.outputs.UNPREFIXED_VERSION }}-SNAPSHOT" >> "$GITHUB_ENV"
178+
echo "ARTIFACT_VERSION=${NEEDS_VERSIONING_OUTPUTS_UNPREFIXED_VERSION}-SNAPSHOT" >> "$GITHUB_ENV"
170179
fi
180+
env:
181+
NEEDS_VERSIONING_OUTPUTS_TAG: ${{ needs.versioning.outputs.TAG }}
182+
NEEDS_VERSIONING_OUTPUTS_UNPREFIXED_VERSION: ${{ needs.versioning.outputs.UNPREFIXED_VERSION }}
171183

172184
- name: Set version string
173-
run: sed -i "s/0.0.0/${{ env.ARTIFACT_VERSION }}/g" embedded/android/lib/src/main/kotlin/io/element/android/call/embedded/Version.kt
185+
run: sed -i "s/0.0.0/${ARTIFACT_VERSION}/g" embedded/android/lib/src/main/kotlin/io/element/android/call/embedded/Version.kt
174186

175187
- name: Publish AAR
176188
working-directory: embedded/android
@@ -184,7 +196,7 @@ jobs:
184196

185197
- id: artifact_version
186198
name: Output artifact version
187-
run: echo "ARTIFACT_VERSION=${{env.ARTIFACT_VERSION}}" >> "$GITHUB_OUTPUT"
199+
run: echo "ARTIFACT_VERSION=${ARTIFACT_VERSION}" >> "$GITHUB_OUTPUT"
188200

189201
publish_ios:
190202
needs: [build_element_call, versioning]
@@ -200,6 +212,7 @@ jobs:
200212
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
201213
with:
202214
path: element-call
215+
persist-credentials: false
203216

204217
- name: 📥 Download built element-call artifact
205218
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
@@ -215,15 +228,18 @@ jobs:
215228
repository: element-hq/element-call-swift
216229
path: element-call-swift
217230
token: ${{ secrets.SWIFT_RELEASE_TOKEN }}
231+
persist-credentials: false
218232

219233
- name: Copy files
220234
run: rsync -a --delete --exclude .git element-call/embedded/ios/ element-call-swift
221235

222236
- name: Get artifact version
223-
run: echo "ARTIFACT_VERSION=${{ needs.versioning.outputs.UNPREFIXED_VERSION }}" >> "$GITHUB_ENV"
237+
run: echo "ARTIFACT_VERSION=${NEEDS_VERSIONING_OUTPUTS_UNPREFIXED_VERSION}" >> "$GITHUB_ENV"
238+
env:
239+
NEEDS_VERSIONING_OUTPUTS_UNPREFIXED_VERSION: ${{ needs.versioning.outputs.UNPREFIXED_VERSION }}
224240

225241
- name: Set version string
226-
run: sed -i "s/0.0.0/${{ env.ARTIFACT_VERSION }}/g" element-call-swift/Sources/EmbeddedElementCall/EmbeddedElementCall.swift
242+
run: sed -i "s/0.0.0/${ARTIFACT_VERSION}/g" element-call-swift/Sources/EmbeddedElementCall/EmbeddedElementCall.swift
227243

228244
- name: Test build
229245
working-directory: element-call-swift
@@ -235,17 +251,22 @@ jobs:
235251
git config --global user.email "ci@element.io"
236252
git config --global user.name "Element CI"
237253
git add -A
238-
git commit -am "Release ${{ needs.versioning.outputs.PREFIXED_VERSION }}"
239-
git tag -a ${{ env.ARTIFACT_VERSION }} -m "${{ github.event.release.html_url }}"
254+
git commit -am "Release ${NEEDS_VERSIONING_OUTPUTS_PREFIXED_VERSION}"
255+
git tag -a ${ARTIFACT_VERSION} -m "${GITHUB_EVENT_RELEASE_HTML_URL}"
256+
env:
257+
NEEDS_VERSIONING_OUTPUTS_PREFIXED_VERSION: ${{ needs.versioning.outputs.PREFIXED_VERSION }}
258+
GITHUB_EVENT_RELEASE_HTML_URL: ${{ github.event.release.html_url }}
240259

241260
- name: Push
242261
working-directory: element-call-swift
243262
run: |
244-
git push --tags ${{ needs.versioning.outputs.DRY_RUN == 'true' && '--dry-run' || '' }}
263+
git push "https://x-access-token:${SWIFT_RELEASE_TOKEN}@github.com/element-hq/element-call-swift.git" --tags ${{ needs.versioning.outputs.DRY_RUN == 'true' && '--dry-run' || '' }}
264+
env:
265+
SWIFT_RELEASE_TOKEN: ${{ secrets.SWIFT_RELEASE_TOKEN }}
245266

246267
- id: artifact_version
247268
name: Output artifact version
248-
run: echo "ARTIFACT_VERSION=${{env.ARTIFACT_VERSION}}" >> "$GITHUB_OUTPUT"
269+
run: echo "ARTIFACT_VERSION=${ARTIFACT_VERSION}" >> "$GITHUB_OUTPUT"
249270

250271
release_notes:
251272
needs: [versioning, publish_npm, publish_android, publish_ios]
@@ -257,9 +278,13 @@ jobs:
257278
steps:
258279
- name: Log versions
259280
run: |
260-
echo "NPM: ${{ needs.publish_npm.outputs.ARTIFACT_VERSION }}"
261-
echo "Android: ${{ needs.publish_android.outputs.ARTIFACT_VERSION }}"
262-
echo "iOS: ${{ needs.publish_ios.outputs.ARTIFACT_VERSION }}"
281+
echo "NPM: ${NEEDS_PUBLISH_NPM_OUTPUTS_ARTIFACT_VERSION}"
282+
echo "Android: ${NEEDS_PUBLISH_ANDROID_OUTPUTS_ARTIFACT_VERSION}"
283+
echo "iOS: ${NEEDS_PUBLISH_IOS_OUTPUTS_ARTIFACT_VERSION}"
284+
env:
285+
NEEDS_PUBLISH_NPM_OUTPUTS_ARTIFACT_VERSION: ${{ needs.publish_npm.outputs.ARTIFACT_VERSION }}
286+
NEEDS_PUBLISH_ANDROID_OUTPUTS_ARTIFACT_VERSION: ${{ needs.publish_android.outputs.ARTIFACT_VERSION }}
287+
NEEDS_PUBLISH_IOS_OUTPUTS_ARTIFACT_VERSION: ${{ needs.publish_ios.outputs.ARTIFACT_VERSION }}
263288
- name: Add release notes
264289
if: ${{ needs.versioning.outputs.DRY_RUN == 'false' }}
265290
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2

.github/workflows/publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ jobs:
3838
name: build-output-full
3939
path: ${{ env.FILENAME_PREFIX }}
4040
- name: Create Tarball
41-
run: tar --numeric-owner --transform "s/dist/${{ env.FILENAME_PREFIX }}/" -cvzf ${{ env.FILENAME_PREFIX }}.tar.gz ${{ env.FILENAME_PREFIX }}
41+
run: tar --numeric-owner --transform "s/dist/${FILENAME_PREFIX}/" -cvzf ${FILENAME_PREFIX}.tar.gz ${FILENAME_PREFIX}
4242
- name: Create Checksum
43-
run: find ${{ env.FILENAME_PREFIX }} -type f -print0 | sort -z | xargs -0 sha256sum | tee ${{ env.FILENAME_PREFIX }}.sha256
43+
run: find ${FILENAME_PREFIX} -type f -print0 | sort -z | xargs -0 sha256sum | tee ${FILENAME_PREFIX}.sha256
4444
- name: Upload
4545
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2
4646
with:

.github/workflows/test.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
steps:
1111
- name: Checkout code
1212
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
13+
with:
14+
persist-credentials: false
1315
- name: Enable Corepack
1416
run: corepack enable
1517
- name: Yarn cache
@@ -34,6 +36,8 @@ jobs:
3436
runs-on: ubuntu-latest
3537
steps:
3638
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
39+
with:
40+
persist-credentials: false
3741
- name: Enable Corepack
3842
run: corepack enable
3943
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4

.github/workflows/translations-download.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
steps:
1515
- name: Checkout the code
1616
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
17+
with:
18+
persist-credentials: false
1719

1820
- name: Enable Corepack
1921
run: corepack enable

.github/workflows/translations-upload.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
steps:
1616
- name: Checkout the code
1717
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
18+
with:
19+
persist-credentials: false
1820

1921
- name: Upload
2022
uses: localazy/upload@27e6b5c0fddf4551596b42226b1c24124335d24a # v1

0 commit comments

Comments
 (0)