Skip to content

Release to SPM

Release to SPM #15

Workflow file for this run

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