forked from GoogleCloudPlatform/terraformer
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (42 loc) · 1.34 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
name: "release"
on:
push:
tags:
- "*"
jobs:
release:
name: "Release"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- name: set env
run: echo "NOW=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
- name: Set Node.js 21.x
uses: actions/setup-node@v3
with:
node-version: 21.x
- name: Install Node.js dependencies
run: yarn install
- name: Generate provider code
run: node generators/rootly/rootly.js
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Build for linux/amd64
run: go build -o terraformer-rootly-linux-amd64
- name: Build for linux/arm64
run: GOOS=linux GOARCH=arm64 go build -o terraformer-rootly-linux-arm64
- name: Build for mac
run: GOOS=darwin go build -o terraformer-rootly-darwin-amd64
- name: Build for mac Apple Silicon
run: GOOS=darwin GOARCH=arm64 go build -o terraformer-rootly-darwin-arm64
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
terraformer-rootly-linux-amd64
terraformer-rootly-linux-arm64
terraformer-rootly-darwin-amd64
terraformer-rootly-darwin-arm64