File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed
Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Deploy DMG
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*' # Triggers when pushing tags like v1.0.0, v2.0.0, etc.
7+
8+ jobs :
9+ build-dmg :
10+ runs-on : macos-latest
11+
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v3
15+
16+ - name : Set up Node.js (if applicable, or replace with your build setup)
17+ uses : actions/setup-node@v3
18+ with :
19+ node-version : ' 14'
20+
21+ - name : Install dependencies
22+ run : npm install # Change this to your project’s installation command
23+
24+ - name : Build DMG
25+ run : |
26+ # Run your build command here to generate the DMG
27+ # For example:
28+ npm run build-dmg # Update based on your specific DMG generation command
29+ mv path/to/output.dmg ./your-app.dmg # Move the DMG file to a known location
30+
31+ - name : Upload DMG Artifact (optional)
32+ uses : actions/upload-artifact@v3
33+ with :
34+ name : your-app.dmg
35+ path : ./your-app.dmg # Adjust the path to match your DMG file location
36+
37+ - name : Create GitHub Release
38+ id : create_release
39+ uses : actions/create-release@v1
40+ env :
41+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
42+ with :
43+ tag_name : ${{ github.ref }} # Use the tag from the push event
44+ release_name : Release ${{ github.ref }}
45+ draft : false
46+ prerelease : false
47+
48+ - name : Upload DMG to Release
49+ uses : actions/upload-release-asset@v1
50+ with :
51+ upload_url : ${{ steps.create_release.outputs.upload_url }}
52+ asset_path : ./your-app.dmg
53+ asset_name : your-app.dmg
54+ asset_content_type : application/octet-stream
You can’t perform that action at this time.
0 commit comments