File tree Expand file tree Collapse file tree 5 files changed +32
-5
lines changed
Expand file tree Collapse file tree 5 files changed +32
-5
lines changed Original file line number Diff line number Diff line change @@ -281,3 +281,11 @@ jobs:
281281 with :
282282 name : OpenMS-App
283283 path : dist
284+
285+ - name : Upload Artifact as Release Asset
286+ if : github.event_name == 'release'
287+ uses : softprops/action-gh-release@v2
288+ with :
289+ files : OpenMS-App.zip
290+ env :
291+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 44 branches : [ "main" ]
55 pull_request :
66 branches : [ "main" ]
7+ release :
8+ types : [created]
79 workflow_dispatch :
810
911env :
@@ -186,6 +188,14 @@ jobs:
186188 - name : Checkout
187189 uses : actions/checkout@v4
188190
191+ - name : Set Version in settings.json
192+ run : |
193+ $VERSION="${{ github.event.release.tag_name }}"
194+ $content = Get-Content -Raw settings.json | ConvertFrom-Json
195+ $content.version = $VERSION
196+ $content | ConvertTo-Json -Depth 100 | Set-Content settings.json
197+
198+
189199 - name : Download package as artifact
190200 uses : actions/download-artifact@v4
191201 with :
@@ -419,3 +429,11 @@ jobs:
419429 name : OpenMS-App
420430 path : |
421431 OpenMS-App.zip
432+
433+ - name : Upload Artifact as Release Asset
434+ if : github.event_name == 'release'
435+ uses : softprops/action-gh-release@v2
436+ with :
437+ files : OpenMS-App.zip
438+ env :
439+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -151,14 +151,15 @@ RUN mamba run -n streamlit-env python hooks/hook-analytics.py
151151# Set Online Deployment
152152RUN jq '.online_deployment = true' settings.json > tmp.json && mv tmp.json settings.json
153153
154- # Download latest OpenMS App executable for Windows from Github actions workflow.
154+ # Download latest OpenMS App executable as a ZIP file
155155RUN if [ -n "$GH_TOKEN" ]; then \
156156 echo "GH_TOKEN is set, proceeding to download the release asset..." ; \
157- gh run download -R ${GITHUB_USER}/${GITHUB_REPO} $(gh run list -R ${GITHUB_USER}/${GITHUB_REPO} -b main -e push -s completed -w "Build executable for Windows" --json databaseId -q '.[0].databaseId' ) -n OpenMS-App --dir /app; \
157+ gh release download -R ${GITHUB_USER}/${GITHUB_REPO} -p " OpenMS-App.zip" -D /app; \
158158 else \
159159 echo "GH_TOKEN is not set, skipping the release asset download." ; \
160160 fi
161161
162+
162163# Run app as container entrypoint.
163164EXPOSE $PORT
164165ENTRYPOINT ["/app/entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -97,10 +97,10 @@ RUN mamba run -n streamlit-env python hooks/hook-analytics.py
9797# Set Online Deployment
9898RUN jq '.online_deployment = true' settings.json > tmp.json && mv tmp.json settings.json
9999
100- # Download latest OpenMS App executable for Windows from Github actions workflow.
100+ # Download latest OpenMS App executable as a ZIP file
101101RUN if [ -n "$GH_TOKEN" ]; then \
102102 echo "GH_TOKEN is set, proceeding to download the release asset..."; \
103- gh run download -R ${GITHUB_USER}/${GITHUB_REPO} $(gh run list -R ${GITHUB_USER}/${GITHUB_REPO} -b main -e push -s completed -w "Build executable for Windows" --json databaseId -q '.[0].databaseId') -n OpenMS-App --dir /app; \
103+ gh release download -R ${GITHUB_USER}/${GITHUB_REPO} -p " OpenMS-App.zip" -D /app; \
104104 else \
105105 echo "GH_TOKEN is not set, skipping the release asset download."; \
106106 fi
Original file line number Diff line number Diff line change 1616 "online_deployment" : false ,
1717 "enable_workspaces" : true ,
1818 "test" : true
19- }
19+ }
You can’t perform that action at this time.
0 commit comments