forked from OpenTabletDriver/OpenTabletDriver
-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (117 loc) · 4.2 KB
/
Copy pathrelease.yml
File metadata and controls
138 lines (117 loc) · 4.2 KB
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
129
130
131
132
133
134
135
136
137
138
name: Release
on:
workflow_dispatch:
inputs:
version_suffix:
description: 'The version suffix for this manual build.'
required: false
push:
tags:
- "v*"
jobs:
ubuntu:
runs-on: ubuntu-latest
name: Unix Release (Ubuntu Host)
env:
VERSION_SUFFIX: ${{ github.event.inputs.version_suffix }}
steps:
- name: Install required packages
run: sudo apt install -y debhelper dotnet-sdk-8.0
- name: Checkout OpenTabletDriver Repository
uses: actions/checkout@v4
- name: Debian Build
run: ./eng/linux/package.sh --package Debian --output ./dist/debian
- name: Generic Linux Build
run: ./eng/linux/package.sh --package BinaryTarBall --output ./dist/tarball
- name: MacOS Build
run: ./eng/macos/package.sh --package true --output ./dist/macos
- name: Upload all artifacts (Release)
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
name: OpenTabletDriver v${{ github.ref_name }}
draft: true
files: |
./dist/debian/*.deb
./dist/tarball/*.tar.gz
./dist/macos/*.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Debian artifact (Dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v3.1.3
with:
name: OpenTabletDriver.deb
path: ./dist/debian/*.deb
- name: Upload generic Linux artifact (Dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v3.1.3
with:
name: OpenTabletDriver.linux-x64.tar.gz
path: ./dist/tarball/*.tar.gz
- name: Upload macOS artifact (Dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v3.1.3
with:
name: OpenTabletDriver.osx-x64.tar.gz
path: ./dist/macos/*.tar.gz
fedora:
runs-on: ubuntu-latest
name: Unix Release (Fedora Host)
container:
image: fedora
env:
VERSION_SUFFIX: ${{ github.event.inputs.version_suffix }}
steps:
- name: Install required packages
run: sudo dnf install -y rpm-build systemd-rpm-macros libicu openssl-libs zlib krb5-libs git dotnet-sdk-8.0 tree jq
- name: Checkout OpenTabletDriver Repository
uses: actions/checkout@v4
# https://github.com/actions/checkout/issues/1169
- run: git config --system --add safe.directory /__w/OpenTabletDriver/OpenTabletDriver
- name: RPM Build
run: ./eng/linux/package.sh --package RedHat --output ./dist/redhat
- name: Upload all artifacts (Release)
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
name: OpenTabletDriver v${{ github.ref_name }}
draft: true
files: ./dist/redhat/*.rpm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload RPM artifact (Dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v3.1.3
with:
name: OpenTabletDriver.rpm
path: ./dist/redhat/*.rpm
windows:
runs-on: windows-latest
name: Windows Release
env:
VERSION_SUFFIX: ${{ github.event.inputs.version_suffix }}
steps:
- name: Checkout OpenTabletDriver Repository
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: '8.0'
- name: Package
run: ./eng/windows/package.ps1
- name: Upload Windows asset (Release)
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
name: OpenTabletDriver v${{ github.ref_name }}
draft: true
files: ./dist/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Windows asset (Dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v3.1.3
with:
name: OpenTabletDriver.win-x64.zip
path: ./dist/*.zip