-
Notifications
You must be signed in to change notification settings - Fork 9
49 lines (41 loc) · 1.5 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Publish SplineRuntime.xcframework
on:
repository_dispatch:
types: [runtime_publish]
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Generate token from spline-bot
id: generate-token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.SPLINE_BOT_APP_ID }}
private_key: ${{ secrets.SPLINE_BOT_APP_KEY }}
- name: Checkout repo
uses: actions/checkout@v4
with:
token: ${{ steps.generate-token.outputs.token }}
- name: Download the zip
uses: actions/download-artifact@v4
with:
github-token: ${{ secrets.PATSPL }}
name: SplineRuntime_${{ github.event.client_payload.version }}
repository: ${{ github.event.client_payload.source_repo }}
run-id: ${{ github.event.client_payload.run_id }}
- name: Unzip SplineRuntime.xcframework
run: unzip -o SplineRuntime_${{ github.event.client_payload.version }}.zip
- name: Delete the zip
run: rm SplineRuntime_${{ github.event.client_payload.version }}.zip
- name: Push the changes
run: |
git config user.name "spline-bot[bot]"
git config user.email "spline-bot[bot]@users.noreply.github.com"
if [[ `git status --porcelain` ]]; then
git add -A
git commit -m "Release ${{ github.event.client_payload.version }}"
git push
else
echo "No local changes detected."
fi