Skip to content

Commit

Permalink
Manage versioning (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
peb-adr authored Aug 30, 2023
1 parent f58d71b commit 33c76ee
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
name: GitHub Release
name: GitHub Release (reusable)
on:
push:
branches: [main]
workflow_call:
inputs:
branch:
type: string
default: main
tag:
type: string
default: dev
title:
type: string
default: Development Build
prerelease:
type: boolean
default: true

jobs:
release:
name: Create GitHub Release and upload binary
Expand All @@ -14,6 +27,8 @@ jobs:

- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
ref: "${{ inputs.branch }}"

- name: Build binaries
run: go build ./cmd/openslides
Expand All @@ -22,8 +37,8 @@ jobs:
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
automatic_release_tag: "${{ inputs.tag }}"
prerelease: "${{ inputs.prerelease }}"
title: "${{ inputs.title }}"
files: |
openslides
9 changes: 9 additions & 0 deletions .github/workflows/release-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: GitHub Release (dev)
on:
push:
branches: [main]

jobs:
release-dev:
name: "Create dev Release"
uses: ./.github/workflows/release-create.yml
24 changes: 24 additions & 0 deletions .github/workflows/release-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: GitHub Release (stable)
on:
repository_dispatch:
types: [stable-update]

jobs:
release-stable:
name: "Create GitHub Release (4.x.x) and upload binary"
if: startsWith(github.event.client_payload.branch, 'stable/4')
uses: ./.github/workflows/release-create.yml
with:
branch: "${{ github.event.client_payload.branch }}"
tag: "${{ github.event.client_payload.version }}"
title: Stable Build
prerelease: false
release-stable-latest:
name: "Create GitHub Release (latest) and upload binary"
if: startsWith(github.event.client_payload.branch, 'stable/4')
uses: ./.github/workflows/release-create.yml
with:
branch: "${{ github.event.client_payload.branch }}"
tag: latest
title: Stable Build
prerelease: false

0 comments on commit 33c76ee

Please sign in to comment.