Skip to content

Commit 8f18974

Browse files
committed
Update release workflow: setup builds for all supported operating systems (dispatch, cron, tag)
1 parent b914a45 commit 8f18974

File tree

2 files changed

+40
-132
lines changed

2 files changed

+40
-132
lines changed

.github/workflows/release-scheduled.yml

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

.github/workflows/release.yml

Lines changed: 40 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,57 @@
11
name: Release
22
on:
3+
schedule:
4+
- cron: "0 12 * * *"
35
workflow_dispatch:
46
inputs:
57
version:
68
description: "Version Number"
7-
required: true
89
type: string
9-
linux:
10-
description: "Linux Platform Type"
11-
required: false
12-
default: ubuntu-latest
13-
type: choice
14-
options:
15-
- ubuntu-latest
16-
- ubuntu-22.04
17-
- ubuntu-20.04
18-
- ubuntu-18.04
19-
windows:
20-
description: "Windows Platform Type"
21-
required: false
22-
default: windows-latest
23-
type: choice
24-
options:
25-
- windows-latest
26-
- windows-2022
27-
- windows-2019
28-
macOS:
29-
description: "macOS Platform Type"
30-
required: false
31-
default: macos-latest
32-
type: choice
33-
options:
34-
- macos-latest
35-
- macos-12
36-
- macos-11
37-
- macos-10.15
10+
push:
11+
tags:
12+
- v[0-9]+.[0-9]+.[0-9]+
3813
jobs:
14+
version:
15+
runs-on: ubuntu-latest
16+
outputs:
17+
version: ${{ steps.version.outputs.version || steps.custom.outputs.version || steps.tag.outputs.version }}
18+
steps:
19+
- name: Output Version
20+
id: version
21+
if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.version == '' ) }}
22+
run: echo "version=$(date +'%Y%m%d-%H%M')" >> $GITHUB_OUTPUT
23+
- name: Output Custom Version
24+
id: custom
25+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.version != '' }}
26+
run: echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT
27+
- name: Output Tag
28+
id: tag
29+
if: ${{ github.event_name == 'push' }}
30+
run: echo "version=$(echo ${GITHUB_REF#refs/*/} | sed -e 's/v//')" >> $GITHUB_OUTPUT
3931
linux:
32+
needs: version
33+
strategy:
34+
matrix:
35+
os: [ubuntu-22.04, ubuntu-20.04, ubuntu-18.04]
4036
uses: ./.github/workflows/release-linux.yml
4137
with:
42-
version: ${{ inputs.version }}
43-
platform: ${{ inputs.linux }}
38+
version: ${{ needs.version.outputs.version }}
39+
platform: ${{ matrix.os }}
4440
windows:
41+
needs: version
42+
strategy:
43+
matrix:
44+
os: [windows-2022, windows-2019]
4545
uses: ./.github/workflows/release-windows.yml
4646
with:
47-
version: ${{ inputs.version }}
48-
platform: ${{ inputs.windows }}
47+
version: ${{ needs.version.outputs.version }}
48+
platform: ${{ matrix.os }}
4949
mac:
50+
needs: version
51+
strategy:
52+
matrix:
53+
os: [macos-12, macos-11, macos-10.15]
5054
uses: ./.github/workflows/release-mac.yml
5155
with:
52-
version: ${{ inputs.version }}
53-
platform: ${{ inputs.macOS }}
56+
version: ${{ needs.version.outputs.version }}
57+
platform: ${{ matrix.os }}

0 commit comments

Comments
 (0)