Skip to content

Commit

Permalink
remove old upload script, add basic vet + test
Browse files Browse the repository at this point in the history
  • Loading branch information
abe-winter committed Apr 5, 2024
1 parent c60e1cf commit 0766d76
Showing 1 changed file with 6 additions and 30 deletions.
36 changes: 6 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,16 @@
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:
if: false # disabled while testing new build.yml -- delete this file eventually
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: deps
run: go mod download
- name: build
run: |
GOARCH=arm64 make --always-make module.tar.gz && mv module.tar.gz module-arm64.tar.gz
GOARCH=amd64 make --always-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 }}
go-version: '1.21'
- name: vet
run: go vet ./...
- name: test
run: go test -v ./...

0 comments on commit 0766d76

Please sign in to comment.