Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -479,12 +479,15 @@ jobs:
version: ${{ needs.config.outputs.version }}
code_signing: ${{ inputs.code_signing }}

prerelease:
set_tag_name:
needs: [config, create_draft_release, build_and_deploy, build_xcframework, build_java_package, build_and_deploy_downloader]
if: fromJson(needs.config.outputs.deploy)
runs-on: ubuntu-latest
outputs:
untagged-tag: ${{ steps.set-tag-name.outputs.untagged-tag }}
steps:
- name: Set the tag name
id: set-tag-name
run: |
tag=$VERSION
release_id=${{ fromJson(needs.create_draft_release.outputs.release).id }}
Expand All @@ -499,10 +502,12 @@ jobs:
-H 'X-GitHub-Api-Version: 2022-11-28' \
-f "tag_name=$tag" \
-f "target_commitish=$GITHUB_SHA" \
-q '{ tag_name, target_commitish }'
-q '{ html_url, tag_name, target_commitish }'
)
if [ "$(jq -r .tag_name <<< "$updated")" = "$tag" ] &&
[ "$(jq -r .target_commitish <<< "$updated")" = "$GITHUB_SHA" ]; then
html_url=$(jq -r .html_url <<< "$updated")
echo "untagged-tag=${html_url##*/}" >> "$GITHUB_OUTPUT"
exit 0
fi
echo 'tag_name was not set. retrying' >&2
Expand All @@ -514,6 +519,11 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

prerelease:
needs: [config, create_draft_release, set_tag_name, download_test]
if: fromJson(needs.config.outputs.deploy)
runs-on: ubuntu-latest
steps:
- name: Create the tag
run: |
tag=$VERSION
Expand All @@ -540,8 +550,8 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

download_test:
needs: [config, create_draft_release, prerelease]
needs: [config, set_tag_name]
if: fromJson(needs.config.outputs.deploy)
uses: ./.github/workflows/download_test.yml
with:
version: ${{ inputs.version }}
version: ${{ needs.set_tag_name.outputs.untagged-tag }}