45
45
path : launcher/windows/build/Output/
46
46
retention-days : 5
47
47
48
-
49
48
release :
50
49
if : startsWith(github.ref, 'refs/tags/v')
51
50
runs-on : windows-latest
@@ -57,17 +56,19 @@ jobs:
57
56
name : ' installers'
58
57
path : installers
59
58
60
- # Sign Launcher
59
+ # Sign Launcher
61
60
- name : Sign Windows Launcher
62
61
run : |
63
62
New-Item -ItemType directory -Path certificate
64
63
Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WINDOWS_CERTIFICATE }}'
65
64
certutil -decode certificate\certificate.txt certificate\certificate.pfx
66
65
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /td sha256 /fd sha256 /f certificate\certificate.pfx /p '${{ secrets.WINDOWS_CERTIFICATE_PASS }}' /tr http://timestamp.digicert.com installers/DepthAI_setup.exe
66
+
67
67
- name : Get current tag
68
68
id : tag
69
69
uses : battila7/get-version-action@v2
70
- # Create GitHub release
70
+
71
+ # Create GitHub release
71
72
- uses : actions/create-release@master
72
73
id : createRelease
73
74
name : Create ${{ steps.tag.outputs.version }} DepthAI Demo release
95
96
asset_path : ${{ github.workspace }}\installers\DepthAI_setup.exe
96
97
asset_name : DepthAI-setup-${{ steps.tag.outputs.version }}.exe
97
98
asset_content_type : application/octet-stream
99
+
100
+ latest-release :
101
+ if : startsWith(github.ref, 'refs/tags/v')
102
+ runs-on : windows-latest
103
+ needs : windows-installer
104
+ steps :
105
+ - name : Download Windows installer
106
+ uses : actions/download-artifact@v2
107
+ with :
108
+ name : ' installers'
109
+ path : installers
110
+
111
+ # Create or update "latest" tag
112
+ - name : Create or update "latest" tag
113
+ env :
114
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
115
+ run : |
116
+ latest_tag_sha=$(git rev-parse refs/tags/latest || echo "")
117
+ current_commit_sha=$(git rev-parse HEAD)
118
+ if [ "$latest_tag_sha" != "$current_commit_sha" ]; then
119
+ git tag -f latest
120
+ git push origin --tags --force
121
+ fi
122
+
123
+ # Create or update "latest" release
124
+ - uses : actions/create-release@master
125
+ id : createLatestRelease
126
+ name : Create or update latest DepthAI Demo release
127
+ env :
128
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
129
+ with :
130
+ tag_name : latest
131
+ release_name : DepthAI Demo latest
132
+ body : |
133
+ ## Features
134
+
135
+ ## Bugs
136
+
137
+ ## Misc
138
+
139
+ draft : false
140
+ prerelease : false
141
+
142
+ # Upload release assets for "latest"
143
+ - name : Upload Windows Installer to Latest Release
144
+ uses : actions/upload-release-asset@v1.0.1
145
+ env :
146
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
147
+ with :
148
+ upload_url : ${{ steps.createLatestRelease.outputs.upload_url }}
149
+ asset_path : ${{ github.workspace }}\installers\DepthAI_setup.exe
150
+ asset_name : DepthAI-setup-latest.exe
151
+ asset_content_type : application/octet-stream
0 commit comments