Skip to content

Commit

Permalink
Fix tag usage in tag_and_merge and sparkle_internal workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoy committed Feb 12, 2024
1 parent e57bafa commit 473dcb8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/sparkle_internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
echo "::error::The provided tag ($tag) has incorrect format (attempted to match ${tag_regex})."
exit 1
fi
echo "tag=$(tr '-' '.' <<< $tag)" >> $GITHUB_OUTPUT
echo "tag-in-filename=${tag//-/.}" >> $GITHUB_OUTPUT
- name: Check out the code
uses: actions/checkout@v4
Expand All @@ -54,10 +54,11 @@ jobs:
- name: Fetch DMG
id: fetch-dmg
env:
DMG_NAME: duckduckgo-${{ steps.verify-tag.outputs.tag }}.dmg
DMG_NAME: duckduckgo-${{ steps.verify-tag.outputs.tag-in-filename }}.dmg
run: |
DMG_URL="${{ vars.DMG_URL_ROOT }}${DMG_NAME}"
curl -fLSs -o "$DMG_NAME" "$DMG_URL"
echo "dmg-name=$DMG_NAME" >> $GITHUB_OUTPUT
echo "dmg-path=$DMG_NAME" >> $GITHUB_OUTPUT
- name: Extract Asana Task ID
Expand Down Expand Up @@ -96,7 +97,7 @@ jobs:
--release-notes release_notes.txt \
--key sparkle_private_key
appcast_patch_name="appcast2-${{ steps.verify-tag.outputs.tag }}.patch"
appcast_patch_name="appcast2-${{ steps.verify-tag.outputs.tag-in-filename }}.patch"
mv -f ${{ env.SPARKLE_DIR }}/appcast_diff.txt ${{ env.SPARKLE_DIR }}/${appcast_patch_name}
echo "appcast-patch-name=${appcast_patch_name}" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -129,10 +130,12 @@ jobs:
- name: Set common environment variables
if: always()
env:
DMG_NAME: ${{ steps.fetch-dmg.outputs.dmg-name }}
run: |
echo "APPCAST_PATCH_NAME=${{ steps.appcast.outputs.appcast-patch-name }}" >> $GITHUB_ENV
echo "DMG_NAME=duckduckgo-${{ steps.verify-tag.outputs.tag }}.dmg" >> $GITHUB_ENV
echo "DMG_URL=${{ vars.DMG_URL_ROOT }}duckduckgo-${{ steps.verify-tag.outputs.tag }}.dmg" >> $GITHUB_ENV
echo "DMG_NAME=${DMG_NAME}" >> $GITHUB_ENV
echo "DMG_URL=${{ vars.DMG_URL_ROOT }}${DMG_NAME}" >> $GITHUB_ENV
echo "RELEASE_BUCKET_NAME=${{ vars.RELEASE_BUCKET_NAME }}" >> $GITHUB_ENV
echo "RELEASE_BUCKET_PREFIX=${{ vars.RELEASE_BUCKET_PREFIX }}" >> $GITHUB_ENV
echo "RELEASE_TASK_ID=${{ steps.task-id.outputs.task-id }}" >> $GITHUB_ENV
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/tag_and_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@ jobs:
if: always()
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ steps.create-tag.outputs.tag }}
run: |
echo "TAG=${{ steps.create-tag.outputs.tag }}" >> $GITHUB_ENV
echo "TAG=$TAG" >> $GITHUB_ENV
echo "WORKFLOW_URL=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV
echo "DMG_URL=${{ vars.DMG_URL_ROOT }}duckduckgo-${{ steps.create-tag.outputs.tag }}.dmg" >> $GITHUB_ENV
echo "DMG_URL=${{ vars.DMG_URL_ROOT }}duckduckgo-${TAG//-/.}.dmg" >> $GITHUB_ENV
echo "RELEASE_URL=https://github.com/${{ github.repository }}/releases/tag/${{ steps.create-tag.outputs.tag }}" >> $GITHUB_ENV
if [[ ${{ steps.create-tag.outputs.tag-created }} == "false" ]]; then
last_release_tag=$(gh api /repos/${{ github.repository }}/releases/latest --jq '.tag_name')
Expand Down

0 comments on commit 473dcb8

Please sign in to comment.