Skip to content

Commit

Permalink
Add workflow_dispatch back
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-janidlo authored Dec 23, 2020
1 parent 57f8f3d commit a933b41
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ on:
- develop
- bug/**
- feature/**
workflow_dispatch:
inputs:
deploy:
description: 'Set this to true to deploy to the staging environment after running the workflow'
required: true
default: 'false'


env:
Expand Down Expand Up @@ -111,9 +117,9 @@ jobs:


release:
# only run if both test and build jobs succeeded, and if the branch is either 'master' or 'develop'
# only run if both test and build jobs succeeded, and if either the 'deploy' input is set to true during a workflow_dispatch, or the branch is either 'master' or 'develop'
needs: [test, build]
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' }}
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' || github.event.inputs.deploy }}
runs-on: ubuntu-latest
env:
ITCH_USER: crass-sandwich
Expand All @@ -138,8 +144,8 @@ jobs:
if: ${{ github.ref == 'refs/heads/master' }}
run: echo "ITCH_GAME=witchos" >> $GITHUB_ENV

- name: Set the name of the itch.io page to deploy to for develop branch
if: ${{ github.ref == 'refs/heads/develop' }}
- name: Set the name of the itch.io page to deploy to for develop branch / manual deployment
if: ${{ github.ref == 'refs/heads/develop' || github.event.inputs.deploy }}
run: echo "ITCH_GAME=witchos-secret-version" >> $GITHUB_ENV

- name: Push to itch.io
Expand Down

0 comments on commit a933b41

Please sign in to comment.