Skip to content

Commit c19edb0

Browse files
committed
add release workflow
1 parent 6a2e1a1 commit c19edb0

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This workflow calls a remote workflow for setting up a release publication,
2+
# This workflow is triggered by the creation of a GitHub release and requires a file called publication-request.json in the branch.
3+
4+
name: Release build
5+
6+
on:
7+
release:
8+
types: [created]
9+
workflow_dispatch:
10+
11+
jobs:
12+
check:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
file_exists: ${{ steps.checkfile.outputs.exists }}
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v3
19+
with:
20+
ref: ${{ github.event.release.tag_name }}
21+
22+
- name: Check for publication-request.json
23+
id: checkfile
24+
run: |
25+
if [[ -f "publication-request.json" ]]; then
26+
echo "::set-output name=exists::true"
27+
else
28+
echo "::set-output name=exists::false"
29+
fi
30+
31+
trigger:
32+
needs: check
33+
if: needs.check.outputs.file_exists == 'true'
34+
uses: WorldHealthOrganization/smart-html/.github/workflows/release.yml@main
35+

0 commit comments

Comments
 (0)