Skip to content

Commit 93933a6

Browse files
committed
Added installer and builds for pro version
1 parent cca54c7 commit 93933a6

18 files changed

Lines changed: 1043 additions & 42 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ name: goreleaser
22

33
on:
44
push:
5-
# Pattern matched against refs/tags
5+
# Pattern matched against refs/tags. Tip (vMAJOR.YYMM.PATCH, from main)
6+
# and Pro (vMAJOR.MINOR.PATCH, from a pro-X.Y branch) releases share
7+
# this trigger. The workflow and .goreleaser.yaml of the tagged commit
8+
# are used, the channel comes from internal/types/CHANNEL in that commit
69
tags:
710
- "v[0-9]+.[0-9]+.[0-9]+"
811

@@ -30,6 +33,20 @@ jobs:
3033
with:
3134
fetch-depth: 0
3235
persist-credentials: false
36+
# Checks the tag against internal/types/CHANNEL and the branch it is on
37+
# (Tip from main, Pro from a pro-X.Y branch that is not on main), then
38+
# sets GORELEASER_CURRENT_TAG and GORELEASER_PREVIOUS_TAG for the
39+
# goreleaser steps below
40+
- name: Validate release tag and channel
41+
id: channel
42+
shell: bash
43+
env:
44+
TAG: ${{ github.ref_name }}
45+
run: |
46+
deploy/release_channel.sh ci-env "$TAG" > "$RUNNER_TEMP/release.env"
47+
cat "$RUNNER_TEMP/release.env"
48+
cat "$RUNNER_TEMP/release.env" >> "$GITHUB_ENV"
49+
cat "$RUNNER_TEMP/release.env" >> "$GITHUB_OUTPUT"
3350
- name: Set up Go
3451
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
3552
with:
@@ -38,7 +55,7 @@ jobs:
3855
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6
3956
with:
4057
distribution: goreleaser
41-
version: "v2.12.7"
58+
version: "v2.13.3"
4259
install-only: true
4360
- name: Build unsigned Windows binary
4461
env:
@@ -85,12 +102,30 @@ jobs:
85102
contents: write
86103
packages: write # required to push to GHCR
87104
actions: read # required to download the signed Windows artifact
105+
outputs:
106+
channel: ${{ steps.channel.outputs.OPENRUN_CHANNEL }}
88107
steps:
89108
- name: Checkout
90109
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
91110
with:
92111
fetch-depth: 0
93112
persist-credentials: false
113+
# Checks the tag against internal/types/CHANNEL and the branch it is on
114+
# (Tip from main, Pro from a pro-X.Y branch that is not on main), then
115+
# sets GORELEASER_CURRENT_TAG and GORELEASER_PREVIOUS_TAG for the
116+
# goreleaser steps below
117+
- name: Validate release tag and channel
118+
id: channel
119+
shell: bash
120+
env:
121+
TAG: ${{ github.ref_name }}
122+
run: |
123+
deploy/release_channel.sh ci-env "$TAG" > "$RUNNER_TEMP/release.env"
124+
cat "$RUNNER_TEMP/release.env"
125+
cat "$RUNNER_TEMP/release.env" >> "$GITHUB_ENV"
126+
cat "$RUNNER_TEMP/release.env" >> "$GITHUB_OUTPUT"
127+
# .goreleaser.yaml with the package license set for the channel
128+
deploy/release_channel.sh goreleaser-config "$RUNNER_TEMP/goreleaser.yaml"
94129
- name: Set up Go
95130
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
96131
with:
@@ -116,8 +151,8 @@ jobs:
116151
with:
117152
# either 'goreleaser' (default) or 'goreleaser-pro'
118153
distribution: goreleaser
119-
version: "v2.12.7"
120-
args: release --clean
154+
version: "v2.13.3"
155+
args: release --clean --config ${{ runner.temp }}/goreleaser.yaml
121156
env:
122157
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
123158
# PAT with push access to the openrundev/winget-pkgs fork, used to
@@ -130,6 +165,8 @@ jobs:
130165
obs:
131166
name: Publish to Open Build Service
132167
needs: goreleaser
168+
# The OBS package is the Tip openrun package, there is no openrun-pro one
169+
if: needs.goreleaser.outputs.channel == 'tip'
133170
runs-on: ubuntu-latest
134171
timeout-minutes: 30
135172
permissions:

‎.github/workflows/test.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
branches:
55
- "main"
66
- "release-branch/*"
7+
- "pro-*"
78
paths-ignore:
89
- "docs/**"
910
- "ui/**"

‎.goreleaser.yaml‎

Lines changed: 54 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
11
version: 2
22
project_name: openrun
33

4+
# This one config builds both release channels. The channel comes from
5+
# internal/types/CHANNEL, which is tip on main and pro on a pro-X.Y branch,
6+
# so main and the Pro branches share this file unchanged. The binary embeds
7+
# the same file and reports the channel and license itself.
8+
# tip: openrun packages and image, Apache-2.0, GitHub latest release
9+
# pro: openrun-pro packages and image, PolyForm Free Trial
10+
env:
11+
- CHANNEL={{ trim (readFile "internal/types/CHANNEL") }}
12+
# false for a patch release of an older line, see the brews section
13+
- LATEST={{ envOrDefault "OPENRUN_LATEST" "true" }}
14+
- PKG={{ if eq (trim (readFile "internal/types/CHANNEL")) "pro" }}openrun-pro{{ else }}openrun{{ end }}
15+
- LICENSE_ID={{ if eq (trim (readFile "internal/types/CHANNEL")) "pro" }}LicenseRef-PolyForm-Free-Trial-1.0.0{{ else }}Apache-2.0{{ end }}
16+
417
release:
518
github:
619
owner: openrundev
720
name: openrun
8-
name_template: "Release {{.Tag}}"
21+
name_template: '{{ if eq .Env.CHANNEL "pro" }}OpenRun Pro {{ .Version }}{{ else }}Release {{ .Tag }}{{ end }}'
22+
# A Pro release never becomes the GitHub latest release, the installers
23+
# resolve the latest Tip release through it
24+
make_latest: '{{ eq .Env.CHANNEL "tip" }}'
925
draft: false
1026
prerelease: "auto"
1127

@@ -38,9 +54,6 @@ builds:
3854
- -w
3955
- -X github.com/openrundev/openrun/internal/types.gitCommit={{.ShortCommit}}
4056
- -X github.com/openrundev/openrun/internal/types.gitVersion={{.Version}}
41-
# Release channel and license of this build. This config builds the Tip channel
42-
- -X github.com/openrundev/openrun/internal/types.gitChannel=tip
43-
- -X github.com/openrundev/openrun/internal/types.gitLicense=Apache-2.0
4457
env:
4558
- GO111MODULE=on
4659
- CGO_ENABLED=0
@@ -67,11 +80,21 @@ builds:
6780
output: true
6881

6982
nfpms:
70-
- file_name_template: "{{.ProjectName}}-{{.Tag}}-{{.Arch}}{{if .Arm}}{{.Arm}}{{end}}"
83+
- package_name: "{{ .Env.PKG }}"
84+
# openrun and openrun-pro install the same binary, so only one can be
85+
# installed. conflicts and license are not templated by goreleaser. The
86+
# two lines marked channel-conflicts and channel-license hold the Tip
87+
# values, deploy/release_channel.sh goreleaser-config rewrites them for
88+
# a Pro release and the release workflow runs goreleaser with the config
89+
# it writes. A package must not list itself here, older rpm versions
90+
# then refuse to reinstall it
91+
conflicts:
92+
- openrun-pro # channel-conflicts
93+
file_name_template: "{{ .Env.PKG }}-{{.Tag}}-{{.Arch}}{{if .Arm}}{{.Arm}}{{end}}"
7194
homepage: https://openrun.dev/
7295
description: Open source alternative to Google Cloud Run and AWS App Runner.
7396
maintainer: Ajay Kidave <contact@openrun.dev>
74-
license: Apache 2.0
97+
license: Apache-2.0 # channel-license
7598
vendor: ClaceIO LLC.
7699
formats:
77100
- deb
@@ -86,14 +109,14 @@ checksum:
86109
algorithm: sha256
87110

88111
archives:
89-
- name_template: "{{.ProjectName}}-{{.Tag}}-{{.Os}}-{{.Arch}}{{if .Arm}}{{.Arm}}{{end}}"
112+
- name_template: "{{ .Env.PKG }}-{{.Tag}}-{{.Os}}-{{.Arch}}{{if .Arm}}{{.Arm}}{{end}}"
90113
id: zip-archives
91114
wrap_in_directory: true
92115
format: zip
93116
files:
94117
- README.md
95118
- LICENSE
96-
- name_template: "{{.ProjectName}}-{{.Tag}}-{{.Os}}-{{.Arch}}{{if .Arm}}{{.Arm}}{{end}}"
119+
- name_template: "{{ .Env.PKG }}-{{.Tag}}-{{.Os}}-{{.Arch}}{{if .Arm}}{{.Arm}}{{end}}"
97120
id: targz-archives
98121
wrap_in_directory: true
99122
format: tar.gz
@@ -118,8 +141,13 @@ changelog:
118141
- title: Other
119142
order: 999
120143

144+
# Both channels are published, as separate packages that conflict with each
145+
# other: openrun for Tip, openrun-pro for Pro
121146
brews:
122-
- name: openrun
147+
- name: "{{ .Env.PKG }}"
148+
license: "{{ .Env.LICENSE_ID }}"
149+
conflicts:
150+
- '{{ if eq .Env.CHANNEL "pro" }}openrun{{ else }}openrun-pro{{ end }}'
123151
homepage: https://openrun.dev
124152
ids: [targz-archives]
125153
repository:
@@ -133,7 +161,10 @@ brews:
133161
working_dir HOMEBREW_PREFIX
134162
log_path var/"log/openrun.log"
135163
error_log_path var/"log/openrun.log"
136-
skip_upload: auto
164+
# The tap holds one version per formula. A patch release of an older Pro
165+
# line must not replace the formula of a newer line, OPENRUN_LATEST is set
166+
# by deploy/release_channel.sh ci-env in the release workflow
167+
skip_upload: '{{ if eq .Env.LATEST "false" }}true{{ else }}auto{{ end }}'
137168
install: |-
138169
bin.install "openrun"
139170
post_install: |-
@@ -153,16 +184,19 @@ brews:
153184
end
154185
155186
winget:
156-
- name: OpenRun
187+
- name: '{{ if eq .Env.CHANNEL "pro" }}OpenRun Pro{{ else }}OpenRun{{ end }}'
157188
publisher: OpenRunDev
158-
package_identifier: OpenRunDev.OpenRun
189+
# Not templated by goreleaser, deploy/release_channel.sh goreleaser-config
190+
# sets OpenRunDev.OpenRunPro on this line for a Pro release
191+
package_identifier: OpenRunDev.OpenRun # channel-winget-id
159192
publisher_url: https://openrun.dev
160193
publisher_support_url: https://github.com/openrundev/openrun/issues
161194
short_description: Declarative web app deployment platform
162-
description: Open source alternative to Google Cloud Run and AWS App Runner.
195+
description: '{{ if eq .Env.CHANNEL "pro" }}Pro release of OpenRun, internal tools deployment platform.{{ else }}Internal tools deployment platform.{{ end }}'
163196
homepage: https://openrun.dev
164-
license: Apache-2.0
165-
license_url: https://github.com/openrundev/openrun/blob/main/LICENSE
197+
license: "{{ .Env.LICENSE_ID }}"
198+
# The Pro license is the LICENSE file of the released commit
199+
license_url: 'https://github.com/openrundev/openrun/blob/{{ if eq .Env.CHANNEL "pro" }}{{ .Tag }}{{ else }}main{{ end }}/LICENSE'
166200
release_notes_url: "https://github.com/openrundev/openrun/releases/tag/{{.Tag}}"
167201
copyright: ClaceIO LLC.
168202
ids: [zip-archives]
@@ -178,7 +212,7 @@ winget:
178212
repository:
179213
owner: openrundev
180214
name: winget-pkgs
181-
branch: "openrun-{{.Version}}"
215+
branch: "{{ .Env.PKG }}-{{.Version}}"
182216
token: "{{ .Env.WINGET_GITHUB_TOKEN }}"
183217
pull_request:
184218
enabled: true
@@ -196,13 +230,14 @@ dockers_v2:
196230
# Build both platforms and publish a single multi-arch manifest
197231
platforms: [linux/amd64, linux/arm64]
198232
images:
199-
- ghcr.io/openrundev/openrun
233+
- "ghcr.io/openrundev/{{ .Env.PKG }}"
200234
tags:
201235
- "{{ .Version }}" # e.g. 1.2.3
202236
- "sha-{{ .ShortCommit }}"
203-
- latest
237+
# latest is only moved by Tip releases, an empty tag is skipped
238+
- '{{ if eq .Env.CHANNEL "tip" }}latest{{ end }}'
204239
labels:
205-
"org.opencontainers.image.title": "openrun"
240+
"org.opencontainers.image.title": "{{ .Env.PKG }}"
206241
"org.opencontainers.image.description": "OpenRun: Declarative Web App Deployment"
207242
"org.opencontainers.image.source": "{{ .GitURL }}"
208243
"org.opencontainers.image.revision": "{{ .FullCommit }}"

‎CHANGELOG.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ This project uses a date based versioning system for tip releases.
77

88
## [Unreleased]
99

10+
## [v1.2611.230] - 2026-11-23
11+
1012
### Security
1113

1214
- Any change to a builtin user who holds the `admin` or `admin:manage` permission now requires `admin:manage`, in addition to the `user:*` permission. This covers setting the password, unlock, enable, disable and delete, and creating a user whose name an admin grant already matches. The check applies whichever way the user holds the permission: a group, a grant naming `builtin:<name>`, a config group entry or a `regex:` pattern. Previously only a change to the user's admin groups was checked, so a `user:manage` holder could set the password of an admin user and sign in as that user.

‎Makefile‎

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ ifeq ($(origin .RECIPEPREFIX), undefined)
6868
endif
6969
.RECIPEPREFIX = >
7070

71-
.PHONY: help test unit int testui testconsole covtest covtest-parallel covbuild covunit covint covui covclient covreport next-version release-sdk release fullrelease update-dep update-go int_single lint verify build-linux image tags docs-screenshots
71+
.PHONY: help test unit int testui testconsole covtest covtest-parallel covbuild covunit covint covui covclient covreport next-version pro-branch next-pro-version release-pro release-sdk release fullrelease update-dep update-go int_single lint verify build-linux image tags docs-screenshots
7272

7373
help: ## Display this help section
7474
> @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {printf "\033[36m%-38s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
@@ -292,8 +292,10 @@ update-go: ## Update the Go version in all modules and Actions workflows; args:
292292
# appVersion is the server image tag, so push it after the OpenRun release
293293
# job has published the images.
294294
#
295-
# Pro channel tags (pro/vMAJOR.MINOR.PATCH, from maintenance branches) are not
296-
# handled here yet. The tip_* helpers below only look at v tags, so pro/ tags
295+
# Pro channel tags (vMAJOR.MINOR.PATCH with the minor from 0 to 999, from
296+
# pro-MAJOR.MINOR branches) are handled by deploy/release_channel.sh through
297+
# the pro-branch, next-pro-version and release-pro targets. The tip_* helpers
298+
# below only look at tags with a four digit minor (and v0.x), so Pro tags
297299
# can be added without affecting them.
298300
# ---------------------------------------------------------------------------
299301

@@ -353,12 +355,22 @@ require_date() {
353355
return 1
354356
fi
355357
}
356-
# latest_server_version: print the highest vX.Y.Z server tag without the v
357-
# prefix, or nothing if there is none (run after fetching tags)
358+
# latest_server_version: print the highest Tip server tag without the v
359+
# prefix, or nothing if there is none (run after fetching tags). Tip tags
360+
# have a four digit minor (YYMM), and the v0.x tags from before the channels
361+
# count as Tip. Pro tags (minor 0 to 999, major 1 and up) share the v prefix
362+
# and are left out
358363
latest_server_version() {
359-
git tag -l 'v[0-9]*' | { grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$$' || true; } \
364+
git tag -l 'v[0-9]*' | { grep -E '^v([0-9]+\.[0-9]{4}|0\.[0-9]+)\.[0-9]+$$' || true; } \
360365
| sed 's/^v//' | sort -t. -k1,1n -k2,2n -k3,3n | tail -n 1
361366
}
367+
# require_tip_channel: Tip releases are only made from a tree whose channel file says tip
368+
require_tip_channel() {
369+
if [[ "$$(deploy/release_channel.sh channel)" != "tip" ]]; then
370+
echo "Error: internal/types/CHANNEL is not tip, use make release-pro on a Pro branch" >&2
371+
return 1
372+
fi
373+
}
362374
# tip_version [<version>] [<YYMMDD>]: print the next Tip version,
363375
# MAJOR.YYMM.PATCH for today's UTC date. A version passed in must be exactly
364376
# that version. The date argument replaces today's date; only next-version
@@ -478,6 +490,15 @@ next-version: ## Print the Tip version the next server release would get, tags n
478490
> version=$$(tip_version "$(INPUT)" "$${TIP_TODAY:-}")
479491
> echo "v$$version"
480492

493+
pro-branch: ## Cut a Pro maintenance branch pro-<line> from main with its overlay commit (channel, base, license), not pushed; args: <line> as MAJOR.MINOR
494+
> @deploy/release_channel.sh pro-branch "$(INPUT)"
495+
496+
next-pro-version: ## Print the Pro version the next release of this pro-X.Y branch would get, tags nothing; args: [<version> to validate]
497+
> @deploy/release_channel.sh pro-next "$(INPUT)"
498+
499+
release-pro: ## Tag and push the next Pro release from this pro-X.Y branch; args: [<version>, default computed], RELEASE_NO_PUSH=1 to only tag
500+
> @deploy/release_channel.sh pro-release "$(INPUT)"
501+
481502
release-sdk: ## Tag and push the pkg/binding and pkg/plugin SDK modules; args: <version>
482503
> @$(RELEASE_SH)
483504
> version=$$(version_arg version "$(INPUT)")
@@ -491,6 +512,7 @@ release-sdk: ## Tag and push the pkg/binding and pkg/plugin SDK modules; args: <
491512
release: ## Tag and push the OpenRun server (Tip channel), then create the Helm chart release commit; args: [<version>, default computed] [<helm_version>, default <version>]
492513
> @$(RELEASE_SH)
493514
> require_release_ready .
515+
> require_tip_channel
494516
> require_release_ready ../openrun-helm-charts
495517
> version=$$(tip_version "$(INPUT)")
496518
> helm_version=$$(version_arg helm_version "$(if $(INPUT2),$(INPUT2),$$version)")
@@ -507,6 +529,7 @@ fullrelease: ## Release everything: SDKs, server (Tip channel), every binding pr
507529
> sdk_version=$$(version_arg sdk_version "$(INPUT)")
508530
> bindings_version=$$(version_arg bindings_version "$(INPUT2)")
509531
> for repo in . ../bindings ../openrun-helm-charts; do require_release_ready "$$repo"; done
532+
> require_tip_channel
510533
> version=$$(tip_version "$(INPUT3)")
511534
> require_tip_ancestry
512535
> for tag in "v$$version" "pkg/binding/v$$sdk_version" "pkg/plugin/v$$sdk_version"; do require_no_tag . "$$tag"; done

‎deploy/obs/debian/control‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Homepage: https://openrun.dev/
99
Package: openrun
1010
Architecture: any
1111
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
12+
Conflicts: openrun-pro
1213
Description: Declarative web app deployment platform
1314
OpenRun is an open source alternative to Google Cloud Run and AWS App
1415
Runner. It provides declarative, GitOps based deployment of web apps

‎deploy/obs/openrun.spec‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ License: Apache-2.0
1616
URL: https://openrun.dev/
1717
Source0: openrun-%{version}.tar.gz
1818
Source1: openrun.sysusers
19+
# The Pro channel package installs the same binary
20+
Conflicts: openrun-pro
1921
BuildRequires: systemd-rpm-macros
2022
%if 0%{?suse_version}
2123
BuildRequires: go >= 1.26

‎deploy/obs/update_obs.sh‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ if [ -z "$VERSION" ]; then
2424
exit 1
2525
fi
2626
GIT_COMMIT=$(git -C "$REPO_ROOT" rev-parse --short HEAD)
27+
# The OBS package is the Tip openrun package. A Pro tree would be published
28+
# under that name with a Pro version
29+
if [ "$("$REPO_ROOT/deploy/release_channel.sh" channel)" != "tip" ]; then
30+
echo "internal/types/CHANNEL is not tip, the OBS package is only updated from Tip releases" >&2
31+
exit 1
32+
fi
2733

2834
# macOS bsdtar embeds AppleDouble metadata that GNU tar extracts as ._ files,
2935
# which breaks dpkg-source on OBS. Strip all of it.

0 commit comments

Comments
 (0)