-
Notifications
You must be signed in to change notification settings - Fork 1
140 lines (140 loc) · 5 KB
/
release.yaml
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
139
140
name: Hello HTTP Github CI/CD
on:
push:
tags:
- v**
permissions:
contents: write
actions: read
checks: read
deployments: read
id-token: none
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: none
statuses: read
jobs:
build-ubuntu:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
- run: ./gradlew createDistributable packageDistributionForCurrentOS
- run: pushd ./build/compose/binaries/main/app && ls -al && tar -cvzf "app.tar.gz" "Hello HTTP" && mv "app.tar.gz" "../../../../../HelloHTTP-${{ github.ref_name }}-ubuntu-${{ runner.arch }}.tar.gz" && popd
- uses: softprops/action-gh-release@v1
with:
files: "HelloHTTP-${{ github.ref_name }}-ubuntu-${{ runner.arch }}.tar.gz"
draft: true
build-windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
- run: ./gradlew createDistributable packageDistributionForCurrentOS
- run: pushd ./build/compose/binaries/main/app && dir && tar -acf "app.zip" "Hello HTTP" && move "app.zip" "../../../../../HelloHTTP-${{ github.ref_name }}-windows-${{ runner.arch }}.zip" && popd
- uses: softprops/action-gh-release@v1
with:
files: "HelloHTTP-${{ github.ref_name }}-windows-${{ runner.arch }}.zip"
draft: true
build-macos:
runs-on: macos-11
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
- run: ./gradlew createDistributable packageDistributionForCurrentOS
- run: mv ./build/compose/binaries/main/dmg/*.dmg "./HelloHTTP-${{ github.ref_name }}-macos-${{ runner.arch }}.dmg"
- uses: softprops/action-gh-release@v1
with:
files: "./HelloHTTP-${{ github.ref_name }}-macos-${{ runner.arch }}.dmg"
draft: true
build-other-linux-x64:
name: Build on ${{ matrix.distro_name }} x64
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- distro_name: debian
image: debian:bullseye
container: ${{ matrix.image }}
steps:
- run: apt-get update
- run: apt-get install -y git binutils
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
- run: pwd
- run: git config --global --add safe.directory "$(pwd)"
- run: ./gradlew createDistributable packageDistributionForCurrentOS
- run: pushd ./build/compose/binaries/main/app && ls -al && tar -cvzf "app.tar.gz" "Hello HTTP" && mv "app.tar.gz" "../../../../../HelloHTTP-${{ github.ref_name }}-${{ matrix.distro_name }}-${{ runner.arch }}.tar.gz" && popd
- uses: softprops/action-gh-release@v1
with:
files: "HelloHTTP-${{ github.ref_name }}-${{ matrix.distro_name }}-${{ runner.arch }}.tar.gz"
draft: true
build-other-linux-other-archs:
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- arch: armv7
distro: bullseye
distro_name: debian
- arch: armv7
distro: fedora_latest
distro_name: fedora
- arch: aarch64
distro: bullseye
distro_name: debian
- arch: aarch64
distro: ubuntu20.04
distro_name: ubuntu
- arch: aarch64
distro: fedora_latest
distro_name: fedora
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
# setup: |
# mkdir -p "${PWD}/artifacts"
# dockerRunArgs: |
# --volume "${PWD}/artifacts:/artifacts"
env: |
artifact_name: HelloHTTP-${{ github.ref_name }}-${{ matrix.distro_name }}-${{ matrix.arch }}.tar.gz
install: |
mkdir -p /wd
cd /wd
case "${{ matrix.distro }}" in
ubuntu*|bullseye)
apt-get update -q
apt-get install -q -y git binutils openjdk-17-jdk
;;
fedora*)
dnf -y install which git java-17-openjdk-devel
;;
esac
run: |
uname -a
./gradlew createDistributable packageDistributionForCurrentOS
pushd ./build/compose/binaries/main/app && ls -al && tar -cvzf "app.tar.gz" "Hello HTTP" && mv "app.tar.gz" "../../../../../${artifact_name}" && popd
- uses: softprops/action-gh-release@v1
with:
files: "HelloHTTP-${{ github.ref_name }}-${{ matrix.distro }}-${{ matrix.arch }}.zip"
draft: true