Skip to content

Commit 404de7a

Browse files
pennypacker-hejoecorall
authored andcommitted
[skip-release] Make release publication recoverable
1 parent 21ed9fa commit 404de7a

3 files changed

Lines changed: 65 additions & 2 deletions

File tree

.github/workflows/goreleaser.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@ name: goreleaser
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
release-mode:
7+
description: Recovery mode; full is only valid from a new tag ref
8+
required: true
9+
type: choice
10+
default: packages-only
11+
options:
12+
- packages-only
13+
- homebrew-only
14+
- full
15+
release-version:
16+
description: Existing vMAJOR.MINOR.PATCH tag for a recovery mode
17+
required: false
18+
type: string
519
push:
620
tags:
721
- "*"
@@ -12,11 +26,13 @@ permissions:
1226

1327
jobs:
1428
goreleaser:
15-
uses: libops/.github/.github/workflows/sitectl-plugin-goreleaser.yaml@69fc4b92079cd51606e1d4757031c6e9b645bb5a # main
29+
uses: libops/.github/.github/workflows/sitectl-plugin-goreleaser.yaml@66905c983e1ec673e936a7dc4b4d5c2ad0016b49 # main
1630
permissions:
1731
contents: write
1832
id-token: write
1933
secrets: inherit
2034
with:
21-
go-version: "1.26.x"
35+
go-version: "1.26.5"
36+
release-mode: ${{ inputs.release-mode || 'full' }}
37+
release-version: ${{ inputs.release-version }}
2238
package-name: sitectl-drupal
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: release-config
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".goreleaser.yaml"
7+
- ".github/workflows/goreleaser.yaml"
8+
- ".github/workflows/release-config.yaml"
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: release-config-${{ github.event.pull_request.number }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
validate:
19+
runs-on: ubuntu-24.04
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
23+
with:
24+
persist-credentials: false
25+
26+
- name: Install GoReleaser
27+
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6
28+
with:
29+
distribution: goreleaser
30+
version: v2.17.0
31+
install-only: true
32+
33+
- name: Validate release configuration
34+
env:
35+
GORELEASER_DISABLE_SCM_RELEASE: "false"
36+
run: goreleaser check

.goreleaser.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
version: 2
2+
release:
3+
disable: "{{ .Env.GORELEASER_DISABLE_SCM_RELEASE }}"
24
before:
35
hooks:
46
- ./scripts/check-sitectl-core-version.sh v0.40.0
@@ -41,14 +43,23 @@ changelog:
4143
- "^.github"
4244
brews:
4345
- name: sitectl-drupal
46+
description: "A sitectl plugin for Drupal websites"
4447
homepage: "https://github.com/libops/sitectl-drupal"
48+
license: MIT
4549
commit_author:
4650
name: sitectl-dev[bot]
4751
email: 2408410+sitectl-dev[bot]@users.noreply.github.com
4852
repository:
4953
owner: libops
5054
name: homebrew
55+
branch: "{{ .ProjectName }}-{{ .Version }}"
5156
token: "{{ .Env.HOMEBREW_REPO_TOKEN }}"
57+
pull_request:
58+
enabled: true
59+
base:
60+
owner: libops
61+
name: homebrew
62+
branch: main
5263
dependencies:
5364
- name: "libops/homebrew/sitectl"
5465
nfpms:

0 commit comments

Comments
 (0)