forked from infracost/infracost
-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (47 loc) · 1.43 KB
/
create-pr-assets.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
name: Create PR assets
on:
pull_request:
branches: [ master ]
jobs:
build:
name: Build assets
strategy:
matrix:
include:
- target: windows
- target: linux
- target: darwin
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Build project
run: make ${{ matrix.target }}
- name: Upload amd64 build artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.target != 'windows' }}
with:
name: ${{ matrix.target }}-amd64
path: "build/infracost-${{ matrix.target }}-amd64"
- name: Upload windows amd64 build artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.target == 'windows' }}
with:
name: ${{ matrix.target }}-amd64
path: "build/infracost.exe"
- name: Upload arm64 build artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.target != 'windows' }}
with:
name: ${{ matrix.target }}-arm64
path: "build/infracost-${{ matrix.target }}-arm64"
- name: Upload windows arm64 build artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.target == 'windows' }}
with:
name: ${{ matrix.target }}-arm64
path: "build/infracost-arm64.exe"