-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix creating DMG images in GitHub Actions (#1185)
Task/Issue URL: https://app.asana.com/0/1203301625297703/1204523592790998/f Description: Create DMG in a separate job that’s running on macOS 12, while keeping the build pipeline on macOS 13.
- Loading branch information
Showing
3 changed files
with
151 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Upload file to Asana | ||
description: Uploads a file to an Asana task | ||
inputs: | ||
access-token: | ||
description: "Asana access token" | ||
required: true | ||
type: string | ||
file-name: | ||
description: "Name of the uploaded file" | ||
required: true | ||
type: string | ||
task-url: | ||
description: "Asana task URL" | ||
required: true | ||
type: string | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: | | ||
task_url_regex='^https://app.asana.com/[0-9]/[0-9]*/([0-9]*)/f$' | ||
if [[ "${{ inputs.task-url }}" =~ ${task_url_regex} ]]; then | ||
echo "task_id=${BASH_REMATCH[1]}" >> $GITHUB_ENV | ||
else | ||
echo "::error::Asana Task URL has incorrect format (attempted to match ${task_url_regex})." | ||
fi | ||
shell: bash | ||
- run: | | ||
curl -s "https://app.asana.com/api/1.0/tasks/${task_id}/attachments" \ | ||
-H "Authorization: Bearer ${{ inputs.access-token }}" \ | ||
--form "file=@${{ inputs.file-name }}" | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters