Skip to content

Commit

Permalink
ci(release): Move to workflow_dispatch for UI-triggered releases (#710)
Browse files Browse the repository at this point in the history
  • Loading branch information
BYK committed Aug 12, 2020
1 parent 9cfde9e commit 51195b0
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
name: release
on:
repository_dispatch:
types: [release]
workflow_dispatch:
inputs:
version:
description: Version to release
required: false
skip_prepare:
description: Skip preparation step (assume a release branch is ready)
required: false
default: false
dry_run:
description: Do not actually cut the release
required: false
default: false
schedule:
# We want the release to be at 9-10am Pacific Time
# We also want it to be 1 hour before the on-prem release
Expand All @@ -12,18 +23,18 @@ jobs:
name: "Release a new version"
steps:
- id: calver
if: ${{ !github.event.client_payload.version }}
if: ${{ !github.event.inputs.version }}
run: echo "::set-output name=version::$(date +'%y.%-m.0')"
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_SENTRY_BOT_PAT }}
- uses: getsentry/craft@master
if: ${{ !github.event.client_payload.skip_prepare }}
if: ${{ !github.event.inputs.skip_prepare }}
with:
action: prepare
version: ${{ github.event.client_payload.version || steps.calver.outputs.version }}
version: ${{ github.event.inputs.version || steps.calver.outputs.version }}
env:
DRY_RUN: ${{ github.event.client_payload.dry_run }}
DRY_RUN: ${{ github.event.inputs.dry_run }}
GITHUB_API_TOKEN: ${{ secrets.GH_SENTRY_BOT_PAT }}
GIT_COMMITTER_NAME: getsentry-bot
GIT_AUTHOR_NAME: getsentry-bot
Expand All @@ -35,9 +46,9 @@ jobs:
- uses: getsentry/craft@master
with:
action: publish
version: ${{ github.event.client_payload.version || steps.calver.outputs.version }}
version: ${{ github.event.inputs.version || steps.calver.outputs.version }}
env:
DRY_RUN: ${{ github.event.client_payload.dry_run }}
DRY_RUN: ${{ github.event.inputs.dry_run }}
GITHUB_API_TOKEN: ${{ secrets.GH_SENTRY_BOT_PAT }}
GIT_COMMITTER_NAME: getsentry-bot
GIT_AUTHOR_NAME: getsentry-bot
Expand Down

0 comments on commit 51195b0

Please sign in to comment.