Skip to content

Commit 888ed5e

Browse files
committed
Make all pre-releases dry-runs (drafts deleted afterwards) by default
Doing GitHub Release for every single build is very wasteful on GH resources and I am ending this practice. Technically we could tag every release when built and just check a tag exists, but this is also unnecessary - instead we just ensure we run all the tests every time we do a manually triggered release.
1 parent 1aec552 commit 888ed5e

File tree

3 files changed

+8
-37
lines changed

3 files changed

+8
-37
lines changed

.github/workflows/release.yml

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

.github/workflows/test_and_build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ name: Test and Build
66
on:
77
push:
88
branches: [ master ]
9+
workflow_dispatch:
10+
inputs:
11+
prerelease:
12+
description: 'The release should be an experimental release'
13+
default: 'NO'
14+
required: true
915

1016
jobs:
1117
test:
@@ -35,6 +41,7 @@ jobs:
3541
env:
3642
GITHUB_USER: "gocd-contrib"
3743
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
44+
PRERELEASE: "${{ github.event.inputs.prerelease }}"
3845
steps:
3946
- name: Harden the runner (Audit all outbound calls)
4047
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ gocdPlugin {
3737
pluginProject = project
3838

3939
prerelease = !"No".equalsIgnoreCase(System.getenv('PRERELEASE'))
40+
prereleaseDryrun = !"Yes".equalsIgnoreCase(System.getenv('PRERELEASE'))
4041
assetsToRelease = [project.tasks.jar]
4142
}
4243

0 commit comments

Comments
 (0)