Skip to content

Commit 60de423

Browse files
authored
Merge pull request #3554 from Flow-Launcher/add_chocolatey_publish_on_release
Add publish to Chocolatey dispatch action
2 parents 8aed36e + ec7ab00 commit 60de423

File tree

2 files changed

+34
-21
lines changed

2 files changed

+34
-21
lines changed

.github/workflows/release_deploy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
3+
name: New Release Deployments
4+
on:
5+
release:
6+
types: [published]
7+
workflow_dispatch:
8+
9+
jobs:
10+
deploy-website:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Trigger dispatch event for deploying website
14+
run: |
15+
http_status=$(curl -L -f -s -o /dev/null -w "%{http_code}" \
16+
-X POST \
17+
-H "Accept: application/vnd.github+json" \
18+
-H "Authorization: Bearer ${{ secrets.DEPLOY_FLOW_WEBSITE }}" \
19+
https://api.github.com/repos/Flow-Launcher/flow-launcher.github.io/dispatches \
20+
-d '{"event_type":"deploy"}')
21+
if [ "$http_status" -ne 204 ]; then echo "Error: Deploy website failed, HTTP status code is $http_status"; exit 1; fi
22+
23+
publish-chocolatey:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Trigger dispatch event for publishing to Chocolatey
27+
run: |
28+
http_status=$(curl -L -f -s -o /dev/null -w "%{http_code}" \
29+
-X POST \
30+
-H "Accept: application/vnd.github+json" \
31+
-H "Authorization: Bearer ${{ secrets.Publish_Chocolatey }}" \
32+
https://api.github.com/repos/Flow-Launcher/chocolatey-package/dispatches \
33+
-d '{"event_type":"publish"}')
34+
if [ "$http_status" -ne 204 ]; then echo "Error: Publish Chocolatey package failed, HTTP status code is $http_status"; exit 1; fi

.github/workflows/website_deploy.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)