-
Notifications
You must be signed in to change notification settings - Fork 1.2k
95 lines (95 loc) · 3.42 KB
/
cd-badger.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
name: cd-badger
on:
workflow_dispatch:
inputs:
releasetag:
description: 'releasetag'
required: true
type: string
jobs:
badger-build-amd64:
runs-on: warp-ubuntu-latest-x64-4x
steps:
- uses: actions/checkout@v4
with:
ref: '${{ github.event.inputs.releasetag }}'
- name: Get Go Version
run: |
#!/bin/bash
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Set Badger Release Version
run: |
#!/bin/bash
GIT_TAG_NAME='${{ github.event.inputs.releasetag }}'
if [[ "$GIT_TAG_NAME" == "v"* ]];
then
echo "this is a release tag"
else
echo "this is NOT a release tag"
exit 1
fi
BADGER_RELEASE_VERSION='${{ github.event.inputs.releasetag }}'
echo "making a new release for "$BADGER_RELEASE_VERSION
echo "BADGER_RELEASE_VERSION=$BADGER_RELEASE_VERSION" >> $GITHUB_ENV
- name: Fetch dependencies
run: sudo apt-get -y install build-essential
- name: Build badger linux/amd64
run: make badger
- name: Generate SHA for Linux Build
run: cd badger && sha256sum badger-linux-amd64 | cut -c-64 > badger-checksum-linux-amd64.sha256
- name: Tar Archive for Linux Build
run: cd badger && tar -zcvf badger-linux-amd64.tar.gz badger-linux-amd64
- name: Upload Badger Binary Build Artifacts
uses: actions/upload-artifact@v4
with:
path: |
badger/badger-checksum-linux-amd64.sha256
badger/badger-linux-amd64.tar.gz
badger-build-arm64:
runs-on: warp-ubuntu-latest-arm64-4x
steps:
- uses: actions/checkout@v4
with:
ref: '${{ github.event.inputs.releasetag }}'
- name: Get Go Version
run: |
#!/bin/bash
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Set Badger Release Version
run: |
#!/bin/bash
GIT_TAG_NAME='${{ github.event.inputs.releasetag }}'
if [[ "$GIT_TAG_NAME" == "v"* ]];
then
echo "this is a release tag"
else
echo "this is NOT a release tag"
exit 1
fi
BADGER_RELEASE_VERSION='${{ github.event.inputs.releasetag }}'
echo "making a new release for "$BADGER_RELEASE_VERSION
echo "BADGER_RELEASE_VERSION=$BADGER_RELEASE_VERSION" >> $GITHUB_ENV
- name: Fetch dependencies
run: sudo apt-get -y install build-essential
- name: Build badger linux/arm64
run: make badger
- name: Generate SHA for Linux Build
run: cd badger && sha256sum badger-linux-arm64 | cut -c-64 > badger-checksum-linux-arm64.sha256
- name: Tar Archive for Linux Build
run: cd badger && tar -zcvf badger-linux-arm64.tar.gz badger-linux-arm64
- name: Upload Badger Binary Build Artifacts
uses: actions/upload-artifact@v4
with:
path: |
badger/badger-checksum-linux-arm64.sha256
badger/badger-linux-arm64.tar.gz