Skip to content

Commit

Permalink
add github actions for automatic upload
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaney committed Nov 22, 2023
1 parent 9262ccc commit 09f4c5f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
push:
release:
types: [published]

env:
VERSION: ${{ github.event_name == 'release' && github.ref_name || format('0.0.0-{0}.{1}', github.ref_name, github.run_number) }}

jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [arm64, amd64]
steps:
- uses: actions/checkout@v3
- name: build
run: make module.tar.gz
- name: upload
if: ${{ github.event_name == 'release' }}
uses: viamrobotics/upload-module@main
with:
module-path: module.tar.gz
platform: linux/${{ matrix.platform }}
version: ${{ env.VERSION }}
key-id: ${{ secrets.viam_key_id }}
key-value: ${{ secrets.viam_key_value }}
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module.tar.gz: requirements.txt *.sh src/*.py
tar czf module.tar.gz $^

0 comments on commit 09f4c5f

Please sign in to comment.