-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.16 KB
/
deploy.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
on:
workflow_dispatch:
push:
release:
types: [released]
env:
VERSION: ${{ github.event_name == 'release' && github.ref_name || format('0.0.0-{0}.{1}', github.ref_name, github.run_number) }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '~1.20.6'
- name: deps
run: go mod download
- name: build
run: |
GOARCH=arm64 make module.tar.gz && mv module.tar.gz module-arm64.tar.gz
GOARCH=amd64 make module.tar.gz && mv module.tar.gz module-amd64.tar.gz
- uses: viamrobotics/upload-module@main
if: github.event_name == 'release'
with:
module-path: module-arm64.tar.gz
platform: linux/arm64
version: ${{ env.VERSION }}
key-id: ${{ secrets.viam_key_id }}
key-value: ${{ secrets.viam_key_value }}
- uses: viamrobotics/upload-module@main
if: github.event_name == 'release'
with:
module-path: module-amd64.tar.gz
platform: linux/amd64
version: ${{ env.VERSION }}
key-id: ${{ secrets.viam_key_id }}
key-value: ${{ secrets.viam_key_value }}