-
Notifications
You must be signed in to change notification settings - Fork 25
762 lines (658 loc) · 23.9 KB
/
build_and_deploy.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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
---
name: Build And Deploy
on: [push]
jobs:
test:
env:
GONOSUMDB: "github.com/moby/moby"
name: Unit Test
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Setup Go version
uses: actions/setup-go@v1
with:
go-version: 1.19
- name: Get dependencies
run: |
go version
go get -v -t ./...
- name: Unit Test
run: |
go test -v -race ./pkg/jumppad
#- name: Upload Code Coverage
# uses: codecov/codecov-action@v1
# with:
# token: ${{ secrets.CODECOV_TOKEN }} # required
- name: Send status to Discord
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
title: ${{ github.job_id }}
e2e_linux:
name: Linux E2E Tests
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
- name: Setup Go version
uses: actions/setup-go@v1
with:
go-version: 1.19
- name: E2E test for build binary
run: make test_e2e_cmd
- name: Send status to Discord
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
tile: ${{ github.job_id }}
description: "End to end tests for Linux"
# e2e_mac:
# name: Mac E2E Tests
# runs-on: ubuntu-latest
# needs: test
# steps:
# - name: Repository Dispatch
# uses: peter-evans/repository-dispatch@v1
# with:
# token: '${{ secrets.GH_TOKEN }}'
# repository: jumppad-labs/jumppad-mac-build
# event-type: test
# client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
# - name: Send status to Discord
# uses: sarisia/actions-status-discord@v1
# if: always()
# with:
# webhook: ${{ secrets.DISCORD_WEBHOOK }}
# tile: ${{ github.job_id }}
# description: "End to end tests for MacOS amd64"
functional_test_build:
name: Build binary for Functional Tests
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
- name: Setup Go version
uses: actions/setup-go@v1
with:
go-version: 1.19
- name: Build Jumppad binary
run: |
make install_local
- name: Build Podman DNS plugin
run: |
cd ..
git clone https://github.com/containers/dnsname.git
cd dnsname
make
sudo cp ./bin/dnsname /usr/local/bin
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: test_binary
path: |
/usr/local/bin/jumppad
/usr/local/bin/dnsname
functional_test_docker:
name: Functional Test Docker
runs-on: ubuntu-latest
needs: functional_test_build
strategy:
max-parallel: 2
fail-fast: false
matrix:
folder: [
'./examples/container',
'./examples/build',
'./examples/docs',
'./examples/nomad',
'./examples/single_k3s_cluster',
'./examples/multiple_k3s_clusters',
'./examples/local_exec',
'./examples/remote_exec',
'./examples/certificates',
]
steps:
- name: Download-Binaries
uses: actions/download-artifact@v2
with:
name: test_binary
path: /usr/local/bin
- name: Make binary executable
run: |
sudo chmod +x /usr/local/bin/jumppad
- uses: actions/checkout@v2
- name: Setup Go version
uses: actions/setup-go@v1
with:
go-version: 1.19
- name: Run tests
run: |
jumppad check
jumppad purge
jumppad test ${{matrix.folder}}
- name: Send status to Discord
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
tile: ${{ github.job_id }}
description: "Functional tests for docker: ${{matrix.folder}}"
functional_test_podman:
name: Functional Test Podman
runs-on: ubuntu-latest
needs: functional_test_build
strategy:
max-parallel: 2
fail-fast: false
matrix:
folder: [
'./examples/container',
# './examples/build',
# './examples/docs',
'./examples/single_k3s_cluster',
'./examples/nomad',
# './examples/local_exec',
]
steps:
- name: Download-Binaries
uses: actions/download-artifact@v2
with:
name: test_binary
path: /usr/local/bin
- name: Make binary executable
run: |
sudo chmod +x /usr/local/bin/jumppad
- uses: actions/checkout@v2
- name: Setup Go version
uses: actions/setup-go@v1
with:
go-version: 1.19
- name: Install dependencies for Podman tests
run: |
sudo mkdir -p /etc/apt/keyrings
# Debian Testing/Bookworm
curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/Debian_Testing/Release.key \
| gpg --dearmor \
| sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg]\
https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/Debian_Testing/ /" \
| sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null
# Debian Unstable/Sid
curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/Debian_Unstable/Release.key \
| gpg --dearmor \
| sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg]\
https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/Debian_Unstable/ /" \
| sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null
# Install Podman
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install podman
# Start the Podman sock
sudo nohup podman system service -t 0 > ./podman.log &
sleep 10
sudo chmod +x /run/podman
sudo chmod 777 /run/podman/podman.sock
- name: Run tests
run: |
jumppad check
jumppad purge
jumppad test ${{matrix.folder}}
env:
DOCKER_HOST: "unix:///run/podman/podman.sock"
- name: Send status to Discord
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
tile: ${{ github.job_id }}
description: "Functional tests for ${{matrix.folder}}"
build_dev:
name: Build Dev Version
needs:
# - test
- functional_test_docker
# - functional_test_podman
# - e2e_mac
- e2e_linux
if: ${{ github.ref != 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Setup Go version
uses: actions/setup-go@v1
with:
go-version: 1.19
- name: Install dependencies for Podman
run: |
sudo apt install -y libbtrfs-dev pkg-config libgpgme-dev libdevmapper-dev
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: v1.4.1
args: release --rm-dist --snapshot
key: ${{ secrets.GPG_PRIVATE_KEY }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: jumppad_binaries
path: |
dist/jumppad_darwin_arm64
dist/jumppad_darwin_amd64
dist/jumppad_linux_amd64
dist/jumppad_linux_arm64
dist/jumppad_linux_arm_7
dist/jumppad_linux_arm_6
dist/jumppad_windows_amd64
- name: Send status to Discord
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
tile: ${{ github.job_id }}
description: "Build dev version and upload artifacts"
notorize_mac_dev:
name: Notrize binaries for Mac
needs: build_dev
if: ${{ github.ref != 'refs/heads/main' }}
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download-Binaries
uses: actions/download-artifact@v2
with:
name: jumppad_binaries
path: dist/
- name: Import Code-Signing Certificates
uses: Apple-Actions/import-codesign-certs@v1
with:
# The certificates in a PKCS12 file encoded as a base64 string
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
# The password used to import the PKCS12 file.
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
- name: List identities
run: |
security find-identity
- name: Install gon via HomeBrew for code signing and app notarization
run: |
brew tap mitchellh/gon
brew install mitchellh/gon/gon
- name: Sign the Arm64 Mac binaries with Gon
env:
AC_USERNAME: ${{ secrets.AC_USERNAME }}
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
run: |
gon -log-level=debug -log-json ./.gon_arm64.json
- name: Sign the Arm64 Mac binaries with Gon
env:
AC_USERNAME: ${{ secrets.AC_USERNAME }}
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
run: |
gon -log-level=debug -log-json ./.gon_amd64.json
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: jumppad_osx_notorized
path: |
dist/jumppad_arm64.dmg
dist/jumppad_arm64.zip
dist/jumppad_amd64.dmg
dist/jumppad_amd64.zip
- name: Send status to Discord
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
tile: ${{ github.job_id }}
description: "Notorize Mac applications"
tag:
name: Tag latest release
runs-on: ubuntu-latest
permissions:
contents: write
needs:
- test
- functional_test_docker
#- functional_test_podman
#- e2e_mac
- e2e_linux
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- name: Bump version and push tag
id: tag
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Send status to Discord
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
description: "Automatically tagged main branch with new tag: ${{ steps.tag_version.outputs.new_tag }}"
- name: Remove v in Tag
id: version
uses: ashley-taylor/[email protected]
with:
value: ${{ steps.tag.outputs.new_tag }}
regex: "v"
replacement: ""
outputs:
new_tag: ${{ steps.tag.outputs.new_tag }}
new_version: ${{ steps.version.outputs.value }}
build_prod:
name: Build Prod Version
needs: tag
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
ref: ${{ needs.tag.outputs.new_tag }}
- name: Setup Go version
uses: actions/setup-go@v1
with:
go-version: 1.19
- name: Install dependencies for Podman
run: |
sudo apt install -y libbtrfs-dev pkg-config libgpgme-dev libdevmapper-dev
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: v1.4.1
args: release --rm-dist
key: ${{ secrets.GPG_PRIVATE_KEY }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: jumppad_binaries
path: |
dist/jumppad_darwin_arm64
dist/jumppad_darwin_amd64
dist/jumppad_linux_amd64
dist/jumppad_linux_arm64
dist/jumppad_windows_amd64
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: jumppad_archives
path: |
dist/jumppad_${{ needs.tag.outputs.new_version }}_linux_amd64.rpm
dist/jumppad_${{ needs.tag.outputs.new_version }}_linux_arm64.tar.gz
dist/jumppad_${{ needs.tag.outputs.new_version }}_windows_x86_64.zip
dist/jumppad_${{ needs.tag.outputs.new_version }}_linux_x86_64.tar.gz
dist/jumppad_${{ needs.tag.outputs.new_version }}_linux_arm64.deb
dist/jumppad_${{ needs.tag.outputs.new_version }}_linux_arm64.rpm
dist/jumppad_${{ needs.tag.outputs.new_version }}_darwin_x86_64.zip
dist/jumppad_${{ needs.tag.outputs.new_version }}_darwin_arm64.zip
dist/jumppad_${{ needs.tag.outputs.new_version }}_linux_amd64.deb
- name: Send status to Discord
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
tile: ${{ github.job_id }}
description: "Build prod version and upload artifacts"
notorize_mac_prod:
name: Notrize binaries for Mac
needs:
- build_prod
- tag
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ needs.tag.outputs.new_tag }}
- name: Download-Binaries
uses: actions/download-artifact@v2
with:
name: jumppad_binaries
path: dist/
- name: Import Code-Signing Certificates
uses: Apple-Actions/import-codesign-certs@v1
with:
# The certificates in a PKCS12 file encoded as a base64 string
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
# The password used to import the PKCS12 file.
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
- name: List identities
run: |
security find-identity
- name: Install gon via HomeBrew for code signing and app notarization
run: |
brew tap mitchellh/gon
brew install mitchellh/gon/gon
- name: Sign the Arm64 Mac binaries with Gon
env:
AC_USERNAME: ${{ secrets.AC_USERNAME }}
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
run: |
gon -log-level=debug -log-json ./.gon_arm64.json
- name: Sign the Arm64 Mac binaries with Gon
env:
AC_USERNAME: ${{ secrets.AC_USERNAME }}
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
run: |
gon -log-level=debug -log-json ./.gon_amd64.json
- name: Rename files
run: |
ls -las ./dist
rm -f ./dist/jumppad_${{ needs.tag.outputs.new_version }}_darwin_arm64.zip
rm -f ./dist/jumppad_${{ needs.tag.outputs.new_version }}_darwin_x86_64.zip
mv ./dist/jumppad_arm64.zip ./dist/jumppad_${{ needs.tag.outputs.new_version }}_darwin_arm64.zip
mv ./dist/jumppad_amd64.zip ./dist/jumppad_${{ needs.tag.outputs.new_version }}_darwin_x86_64.zip
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: jumppad_archives
path: |
dist/jumppad_${{ needs.tag.outputs.new_version }}_darwin_arm64.zip
dist/jumppad_${{ needs.tag.outputs.new_version }}_darwin_x86_64.zip
- name: Send status to Discord
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
tile: ${{ github.job_id }}
description: "Notorize Mac Prod applications and release assets"
github_release:
name: Create GitHub Release
needs:
- notorize_mac_prod
- tag
environment:
name: release
runs-on: ubuntu-latest
steps:
- name: Download-Binaries
uses: actions/download-artifact@v2
with:
name: jumppad_archives
path: dist/
- name: Generate SHA256 checksums
run: |
cd dist
sha256sum jumppad_${{ needs.tag.outputs.new_version }}_linux_x86_64.tar.gz > checksums.txt
sha256sum jumppad_${{ needs.tag.outputs.new_version }}_linux_arm64.tar.gz >> checksums.txt
sha256sum jumppad_${{ needs.tag.outputs.new_version }}_linux_amd64.deb >> checksums.txt
sha256sum jumppad_${{ needs.tag.outputs.new_version }}_linux_arm64.deb >> checksums.txt
sha256sum jumppad_${{ needs.tag.outputs.new_version }}_linux_amd64.rpm >> checksums.txt
sha256sum jumppad_${{ needs.tag.outputs.new_version }}_linux_arm64.rpm >> checksums.txt
sha256sum jumppad_${{ needs.tag.outputs.new_version }}_darwin_x86_64.zip >> checksums.txt
sha256sum jumppad_${{ needs.tag.outputs.new_version }}_darwin_arm64.zip >> checksums.txt
sha256sum jumppad_${{ needs.tag.outputs.new_version }}_windows_x86_64.zip >> checksums.txt
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.tag.outputs.new_tag }}
token: ${{ secrets.GH_TOKEN }}
files: |
dist/checksums.txt
dist/jumppad_${{ needs.tag.outputs.new_version }}_linux_x86_64.tar.gz
dist/jumppad_${{ needs.tag.outputs.new_version }}_linux_arm64.tar.gz
dist/jumppad_${{ needs.tag.outputs.new_version }}_linux_amd64.rpm
dist/jumppad_${{ needs.tag.outputs.new_version }}_linux_arm64.rpm
dist/jumppad_${{ needs.tag.outputs.new_version }}_linux_amd64.deb
dist/jumppad_${{ needs.tag.outputs.new_version }}_linux_arm64.deb
dist/jumppad_${{ needs.tag.outputs.new_version }}_windows_x86_64.zip
dist/jumppad_${{ needs.tag.outputs.new_version }}_darwin_x86_64.zip
dist/jumppad_${{ needs.tag.outputs.new_version }}_darwin_arm64.zip
brew:
name: Release to HomeBrew
needs:
- github_release
- tag
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
repository: 'jumppad-labs/homebrew-repo'
token: '${{ secrets.GH_TOKEN }}'
- name: Configure Git
run: |
git config user.email "[email protected]"
git config user.name "Jumppad Bot"
git pull origin main
- name: Download-Binaries
uses: actions/download-artifact@v2
with:
name: jumppad_archives
path: dist/
- name: Generate HomeBrew config
run: |
export VERSION=${{ needs.tag.outputs.new_version }}
export DARWIN_ARM64_SHA=$(sha256sum ./dist/jumppad${{ needs.tag.outputs.new_version }}_darwin_arm64.zip | cut -d " " -f 1)
export DARWIN_x86_SHA=$(sha256sum ./dist/jumppad_${{ needs.tag.outputs.new_version }}_darwin_x86_64.zip | cut -d " " -f 1)
export LINUX_ARM64_SHA=$(sha256sum ./dist/jumppad_${{ needs.tag.outputs.new_version }}_linux_arm64.tar.gz | cut -d " " -f 1)
export LINUX_x86_SHA=$(sha256sum ./dist/jumppad_${{ needs.tag.outputs.new_version }}_linux_x86_64.tar.gz | cut -d " " -f 1)
cat <<- EOF > ./jumppad.rb
# typed: false
# frozen_string_literal: true
class Jumppad < Formula
desc ""
homepage "https://jumppad.dev/"
version "${VERSION}"
if OS.mac? && Hardware::CPU.intel?
url "https://github.com/jumppad-labs/jumppad/releases/download/v${VERSION}/jumppad_${VERSION}_darwin_x86_64.zip"
sha256 "${DARWIN_x86_SHA}"
end
if OS.mac? && Hardware::CPU.arm?
url "https://github.com/jumppad-labs/jumppad/releases/download/v${VERSION}/jumppad_${VERSION}_darwin_arm64.zip"
sha256 "${DARWIN_ARM64_SHA}"
end
if OS.linux? && Hardware::CPU.intel?
url "https://github.com/jumppad-labs/jumppad/releases/download/v${VERSION}/jumppad_${VERSION}_linux_x86_64.tar.gz"
sha256 "${LINUX_x86_SHA}"
end
if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
url "https://github.com/jumppad-labs/jumppad/releases/download/v${VERSION}/jumppad_${VERSION}_linux_arm64.tar.gz"
sha256 "${LINUX_ARM64_SHA}"
end
def install
bin.install "jumppad"
end
end
EOF
cat ./jumppad.rb
rm -rf ./dist
- name: Push update
run: |
git add .
git commit -m "Update version to ${{ needs.tag.outputs.new_tag }}"
git push
winget:
name: Publish to WinGet
needs:
- github_release
- tag
runs-on: windows-latest
steps:
- uses: isaacrlevin/[email protected]
with:
publish-type: "Update"
user: "jumppad"
package: "jumppad"
version: ${{ needs.tag.outputs.new_version }}
url: "https://github.com/jumppad-labs/jumppad/releases/download/v${{ needs.tag.outputs.new_version }}/jumppad_${{ needs.tag.outputs.new_version }}_windows_x86_64.zip"
token: '${{ secrets.GH_TOKEN }}'
- name: Send status to Discord
uses: sarisia/actions-status-discord@v1
if: always()
with:
tile: ${{ github.job_id }}
webhook: ${{ secrets.DISCORD_WEBHOOK }}
description: "Push new version ${{ needs.tag.outputs.new_version }} to Winget"
apt:
name: Update fury.io Apt repository
needs:
- github_release
- tag
runs-on: ubuntu-latest
strategy:
matrix:
arch: ["amd64.deb", "arm64.deb", "amd64.rpm", "arm64.rpm"]
steps:
- name: Download release
run: |
wget "https://github.com/jumppad-labs/jumppad/releases/download/v${{ needs.tag.outputs.new_version }}/jumppad_${{ needs.tag.outputs.new_version }}_linux_${{ matrix.arch }}"
- name: Upload release
run: |
curl -F package=@jumppad_${{ needs.tag.outputs.new_version }}_linux_${{ matrix.arch }} https://${{ secrets.FURY_JUMPPAD_TOKEN }}@push.fury.io/jumppad/
- name: Send status to Discord
uses: sarisia/actions-status-discord@v1
if: always()
with:
tile: ${{ github.job_id }}
webhook: ${{ secrets.DISCORD_WEBHOOK }}
description: "Push new version ${{ needs.tag.outputs.new_version }} to Apt"
update_website:
name: Update Jumpad website with latest version
needs:
- github_release
- tag
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
repository: 'jumppad-labs/jumppad-labs.github.io'
token: '${{ secrets.GH_TOKEN }}'
- name: Configure Git
run: |
git config user.email "[email protected]"
git config user.name "Jumppad Bot"
- name: Write version
run: |
echo "${{ needs.tag.outputs.new_version }}" > ./public/latest
- name: Push update
run: |
git add .
git commit -m "Update version to ${{ needs.tag.outputs.new_version }}"
git push
- name: Send status to Discord
uses: sarisia/actions-status-discord@v1
if: always()
with:
tile: ${{ github.job_id }}
webhook: ${{ secrets.DISCORD_WEBHOOK }}
description: "Update website with latest version ${{ needs.tag.outputs.new_version }}"