-
Notifications
You must be signed in to change notification settings - Fork 0
128 lines (113 loc) · 3.98 KB
/
man-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Manual - Release
on:
workflow_dispatch:
inputs:
env:
description: "An Environment"
required: true
type: choice
options:
- Development
- Production
version:
description: "A Version"
required: true
type: string
caching:
description: "Use caching"
required: true
type: boolean
default: false
env:
app_name: ${{ inputs.env == 'Production' && 'SuperHumanInstaller' || 'SuperHumanInstallerDev' }}
app_id: net.prominic.genesis.${{ inputs.env == 'Production' && 'superhumaninstaller' || 'superhumaninstallerdev' }}
tag: v${{ inputs.version }}${{ inputs.env == 'Production' && ' ' || '-dev' }}
workflow: ${{ inputs.env == 'Production' && 'production' || 'development' }}
jobs:
build-linux:
name: Build on Linux
uses: Moonshine-IDE/Super.Human.Installer/.github/workflows/sub-build-linux.yml@master
secrets: inherit
with:
env: ${{ inputs.env }}
version: ${{ inputs.version }}
caching: ${{ inputs.caching }}
build-windows:
name: Build on Windows
uses: Moonshine-IDE/Super.Human.Installer/.github/workflows/sub-build-windows.yml@master
secrets: inherit
with:
env: ${{ inputs.env }}
version: ${{ inputs.version }}
caching: ${{ inputs.caching }}
build-macos:
name: Build on MacOS
uses: Moonshine-IDE/Super.Human.Installer/.github/workflows/sub-build-macos.yml@master
secrets: inherit
with:
env: ${{ inputs.env }}
version: ${{ inputs.version }}
caching: ${{ inputs.caching }}
release:
name: Draft Release
needs: [build-linux, build-windows, build-macos]
runs-on: ubuntu-latest
steps:
- name: Print info
run: |
echo "Ref: ${{ github.ref_name }}"
echo "Env: ${{ inputs.env }}"
echo "Version: ${{ inputs.version }}"
echo "App Name: ${{ env.app_name }}"
echo "App ID: ${{ env.app_id }}"
echo "Tag: ${{ env.tag }}"
- name: Checkout repo
uses: actions/checkout@v4
- name: Download linux installer
uses: actions/download-artifact@v4
with:
name: ${{ env.app_name }}-linux-installer
- name: Download windows installer
uses: actions/download-artifact@v4
with:
name: ${{ env.app_name }}-windows-installer
- name: Download windows chocolatey package
uses: actions/download-artifact@v4
with:
name: ${{ env.app_name }}-Choco
- name: Download macos installer
uses: actions/download-artifact@v4
with:
name: ${{ env.app_name }}-macos-installer
- name: Get Current Time
id: current-time
uses: josStorer/[email protected]
- name: Generate buildinfo
uses: devops-actions/[email protected]
with:
json: |
{
"workflow": "${{ env.workflow }}",
"version": "${{ inputs.version }}",
"branch": "${{ github.ref_name }}",
"commit_sha": "${{ github.sha }}",
"build_date": "${{ steps.current-time.outputs.readableTime }}"
}
filename: buildinfo.json
- name: Create release
uses: softprops/action-gh-release@v1
with:
name: Super.Human.Installer v${{ inputs.version }} ${{ inputs.env }}
tag_name: ${{ env.tag }}
target_commitish: ${{ github.sha }}
body: |
This is a ${{ inputs.env }} release of Super.Human.Installer.
draft: true
prerelease: ${{ inputs.env == 'Development' }}
files: |
${{ env.app_name }}-x86_64.AppImage
${{ env.app_name }}-Setup.pkg
${{ env.app_name }}-Setup.exe
${{ env.app_name }}-Choco.nupkg
buildinfo.json
fail_on_unmatched_files: true