From b24e0135303a43874c38390d8a4cfba771b36f68 Mon Sep 17 00:00:00 2001 From: ritikarawlani <38657562+ritikarawlani@users.noreply.github.com> Date: Fri, 4 Oct 2024 19:41:50 +0530 Subject: [PATCH] add release workflow --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..40f0bc0e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Release build + +on: + release: + types: [created] + workflow_dispatch: + +jobs: + check: + runs-on: ubuntu-latest + outputs: + file_exists: ${{ steps.checkfile.outputs.exists }} + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: ${{ github.event.release.tag_name }} + + - name: Check for publication-request.json + id: checkfile + run: | + if [[ -f "publication-request.json" ]]; then + echo "::set-output name=exists::true" + else + echo "::set-output name=exists::false" + fi + + trigger: + needs: check + if: needs.check.outputs.file_exists == 'true' + uses: WorldHealthOrganization/smart-html/.github/workflows/release.yml@main +# with: +# tag_name: ${{ github.event.release.tag_name }}