Skip to content

add json to enable autoupdate with the new agent logic #759

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 9, 2023
Merged
Changes from 1 commit
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
Next Next commit
add json to enable autoupdate with the new agent logic
  • Loading branch information
umbynos committed Feb 8, 2023
commit cb4013f78d41acbcc682af4ab12bfc09779ab42f
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,25 @@ jobs:
run: aws s3 cp ArduinoCreateAgent.app_notarized.zip s3://${{ secrets.DOWNLOADS_BUCKET }}${{ env.TARGET }}${GITHUB_REF/refs\/tags\//}/ # the version should be created in th the build job
if: ${{ needs.build.outputs.prerelease != 'true' }}

- name: Generate json file used for the new autoupdate
run: |
cat > darwin-amd64-bundle.json <<EOF
{
"Version": "${GITHUB_REF/refs\/tags\//}",
"Sha256": "$(shasum -a 256 ArduinoCreateAgent.app_notarized.zip | awk '{print $1}'"
}
EOF
# we do this because we do not offer a binary for m1 yet,
#`runtime.GOARCH` on an m1 machine returns ARM64, so the call for the file would fail
cp darwin-amd64-bundle.json darwin-arm64-bundle.json
if: ${{ needs.build.outputs.prerelease != 'true' }}

- name: Upload autoupdate files to Arduino downloads servers
run: |
aws s3 cp darwin-amd64-bundle.json s3://${{ secrets.DOWNLOADS_BUCKET }}${{ env.TARGET }}
aws s3 cp darwin-arm64-bundle.json s3://${{ secrets.DOWNLOADS_BUCKET }}${{ env.TARGET }}
if: ${{ needs.build.outputs.prerelease != 'true' }}

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
Expand Down