-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (52 loc) · 2.37 KB
/
spm-release.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Release to SPM
on:
workflow_dispatch:
inputs:
releaseVersion:
description: 'The version/tag of the release'
required: true
commitHash:
description: 'The commit hash if included in Agora filename'
required: false
jobs:
update_spm:
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: main
- name: Remove existing framework and docs
run: |
rm -rf axeDevToolsXCUI.*
- name: Download latest XCUI framework & DocC archive
env:
DQ_AGORA_KEY: ${{ secrets.DQ_AGORA_KEY }}
run: |
VERSION_NUM=${{ github.event.inputs.releaseVersion }}
COMMIT_HASH=${{ github.event.inputs.commitHash }}
BASE_URL="https://agora.dequecloud.com/artifactory/Attest-iOS/axeDevToolsXCUI"
FRAMEWORK_FILENAME="axeDevToolsXCUI.xcframework-${VERSION_NUM}"
DOCS_FILENAME="axeDevToolsXCUI.doccarchive-${VERSION_NUM}"
if [ -n "$COMMIT_HASH" ]; then
FRAMEWORK_FILENAME="${FRAMEWORK_FILENAME}-${COMMIT_HASH}"
DOCS_FILENAME="${DOCS_FILENAME}-${COMMIT_HASH}"
fi
FRAMEWORK_URL="${BASE_URL}/frameworks/${FRAMEWORK_FILENAME}.zip"
DOCS_URL="${BASE_URL}/docs/${DOCS_FILENAME}.zip"
LOCAL_ZIPPED_FRAMEWORK_URL="${FRAMEWORK_FILENAME}.zip"
LOCAL_ZIPPED_DOCS_URL="${DOCS_FILENAME}.zip"
# Download framework & docs
curl -f -H "X-JFrog-Art-Api:${DQ_AGORA_KEY}" -o $LOCAL_ZIPPED_FRAMEWORK_URL $FRAMEWORK_URL
curl -f -H "X-JFrog-Art-Api:${DQ_AGORA_KEY}" -o $LOCAL_ZIPPED_DOCS_URL $DOCS_URL
ls -al .
# Unzip framework & docs
unzip -o ${LOCAL_ZIPPED_FRAMEWORK_URL} -d .
unzip -o $LOCAL_ZIPPED_DOCS_URL -d .
- name: Commit changes
run: |
git config user.name "deque-mobileteam"
git config user.email "mobileteam@deque.com"
git add axeDevToolsXCUI.*
git commit -m "chore: release ${{ github.event.inputs.releaseVersion }}"
git status