From 629de73bd104f4f2f693d5bed252741e51cf299a Mon Sep 17 00:00:00 2001 From: Kyle Lee Date: Mon, 7 Oct 2024 15:03:25 -0700 Subject: [PATCH] test --- .../scripts/DownloadLatestFrameworkAndDocs.sh | 6 ++++++ .github/workflows/spm-release.yml | 21 +++++-------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/scripts/DownloadLatestFrameworkAndDocs.sh b/.github/scripts/DownloadLatestFrameworkAndDocs.sh index 04568f54..9a952177 100755 --- a/.github/scripts/DownloadLatestFrameworkAndDocs.sh +++ b/.github/scripts/DownloadLatestFrameworkAndDocs.sh @@ -1,9 +1,15 @@ VERSION_NUM=$1 +COMMIT_HASH=$2 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" diff --git a/.github/workflows/spm-release.yml b/.github/workflows/spm-release.yml index b5ede88d..124250d7 100644 --- a/.github/workflows/spm-release.yml +++ b/.github/workflows/spm-release.yml @@ -5,6 +5,9 @@ on: 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: @@ -24,7 +27,7 @@ jobs: env: DQ_AGORA_KEY: ${{ secrets.DQ_AGORA_KEY }} run: | - sh .github/scripts/DownloadLatestFrameworkAndDocs.sh ${{ github.event.inputs.releaseVersion }} + sh .github/scripts/DownloadLatestFrameworkAndDocs.sh ${{ github.event.inputs.releaseVersion }} ${{ github.event.inputs.commitHash }} - name: Commit changes run: | @@ -32,20 +35,6 @@ jobs: git config user.email "mobileteam@deque.com" git add axeDevToolsXCUI.* git commit -m "chore: release ${{ github.event.inputs.releaseVersion }}" - git push - - - name: Create and push tag - run: | - git tag -a ${{ github.event.inputs.releaseVersion }} -m "Release ${{ github.event.inputs.releaseVersion }}" - git push origin tag ${{ github.event.inputs.releaseVersion }} - - - name: Create GitHub release - uses: softprops/action-gh-release@v2 - with: - tag_name: ${{ github.event.inputs.releaseVersion }} - release_name: ${{ github.event.inputs.releaseVersion }} - generate_release_notes: true - draft: false - prerelease: false + git status \ No newline at end of file