1
- name : Build and Deploy to Cloudflare R2
1
+ name : Build and Deploy to GitHub Releases
2
2
3
3
on :
4
4
push :
@@ -29,29 +29,16 @@ jobs:
29
29
cd build/macos/Build/Products/Release
30
30
zip -r "Socket_Probe.zip" "Socket Probe.app"
31
31
32
- - name : Upload macOS build to Cloudflare R2 (using put-object and debug)
32
+ - name : Upload macOS build to GitHub Releases
33
+ uses : softprops/action-gh-release@v1
34
+ with :
35
+ tag_name : latest
36
+ files : build/macos/Build/Products/Release/Socket_Probe.zip
33
37
env :
34
- R2_ACCOUNT_ID : ${{ secrets.R2_ACCOUNT_ID }}
35
- R2_BUCKET_NAME : ${{ secrets.R2_BUCKET_NAME }}
36
- run : |
37
- brew install awscli # Install AWS CLI for macOS
38
- aws configure set aws_access_key_id ${{ secrets.R2_ACCESS_KEY_ID }}
39
- aws configure set aws_secret_access_key ${{ secrets.R2_SECRET_ACCESS_KEY }}
40
- aws configure set default.region auto
41
-
42
- # Run the put-object command in debug mode
43
- aws s3api put-object \
44
- --bucket "${{ secrets.R2_BUCKET_NAME }}" \
45
- --key "macos/Socket_Probe.zip" \
46
- --body "build/macos/Build/Products/Release/Socket_Probe.zip" \
47
- --acl public-read \
48
- --endpoint-url "https://pub-6e37860d427d4ca69a176fe1bf8313b6.r2.dev" \
49
- --debug
50
-
51
- echo "✅ macOS build uploaded!"
38
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
52
39
53
40
build-windows :
54
- runs-on : windows-latest # ✅ Use Windows runner for Windows builds
41
+ runs-on : windows-latest
55
42
56
43
steps :
57
44
- name : Checkout code
@@ -68,23 +55,19 @@ jobs:
68
55
- name : Build Windows app
69
56
run : flutter build windows
70
57
71
- - name : Upload Windows build to Cloudflare R2
72
- run : |
73
- choco install awscli # ✅ Install AWS CLI for Windows
74
- aws configure set aws_access_key_id ${{ secrets.R2_ACCESS_KEY_ID }}
75
- aws configure set aws_secret_access_key ${{ secrets.R2_SECRET_ACCESS_KEY }}
76
- aws configure set default.region auto
77
-
78
- aws s3 cp --endpoint-url=https://$R2_ACCOUNT_ID.r2.cloudflarestorage.com \
79
- build/windows/runner/Release/MyApp.exe s3://${{ secrets.R2_BUCKET_NAME }}/windows/MyApp.exe --acl public-read
80
-
81
- echo "✅ Windows build uploaded!"
58
+ - name : Upload Windows build to GitHub Releases
59
+ uses : softprops/action-gh-release@v1
60
+ with :
61
+ tag_name : latest
62
+ files : build/windows/runner/Release/MyApp.exe
63
+ env :
64
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
82
65
83
66
generate-links :
84
- runs-on : ubuntu-latest # ✅ Use Ubuntu for generating download links
67
+ runs-on : ubuntu-latest
85
68
86
69
steps :
87
70
- name : Generate Public Links
88
71
run : |
89
- echo "Download macOS App: https://${{ secrets.R2_ACCOUNT_ID }}.r2.dev /${{ secrets.R2_BUCKET_NAME }}/macos/MyApp.dmg "
90
- echo "Download Windows App: https://${{ secrets.R2_ACCOUNT_ID }}.r2.dev /${{ secrets.R2_BUCKET_NAME }}/windows /MyApp.exe"
72
+ echo "Download macOS App: https://github.com /${{ github.repository }}/releases/latest/download/Socket_Probe.zip "
73
+ echo "Download Windows App: https://github.com /${{ github.repository }}/releases/latest/download /MyApp.exe"
0 commit comments