Skip to content

Commit 09f4c5f

Browse files
committed
add github actions for automatic upload
1 parent 9262ccc commit 09f4c5f

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.github/workflows/module.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
on:
2+
push:
3+
release:
4+
types: [published]
5+
6+
env:
7+
VERSION: ${{ github.event_name == 'release' && github.ref_name || format('0.0.0-{0}.{1}', github.ref_name, github.run_number) }}
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
platform: [arm64, amd64]
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: build
18+
run: make module.tar.gz
19+
- name: upload
20+
if: ${{ github.event_name == 'release' }}
21+
uses: viamrobotics/upload-module@main
22+
with:
23+
module-path: module.tar.gz
24+
platform: linux/${{ matrix.platform }}
25+
version: ${{ env.VERSION }}
26+
key-id: ${{ secrets.viam_key_id }}
27+
key-value: ${{ secrets.viam_key_value }}

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
module.tar.gz: requirements.txt *.sh src/*.py
2+
tar czf module.tar.gz $^

0 commit comments

Comments
 (0)