Skip to content

Commit

Permalink
switch to new build action
Browse files Browse the repository at this point in the history
  • Loading branch information
abe-winter committed Jan 8, 2024
1 parent 261c50b commit 836b0b6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@ on:
inputs:
version:
type: string
push:
# push:
release:
types: [released]

env:
# version blank in non-release case -- that means build but don't upload
VERSION: ${{ inputs.version || (github.event_name == 'release' && github.ref_name || '') }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: viamrobotics/build-action@main
- uses: viamrobotics/build-action@v1
with:
# note: version will be blank on 'push' event.
# This is intentional because this repo still has the legacy upload-module action.
version: ${{ inputs.version }}
version: ${{ env.VERSION }}
ref: ${{ github.sha }}
key-id: ${{ secrets.viam_key_id }}
key-value: ${{ secrets.viam_key_value }}
6 changes: 1 addition & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
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:
Expand All @@ -22,6 +17,7 @@ jobs:
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
# note: this workflow no long has an 'on: release' trigger. see ./build.yml
if: github.event_name == 'release'
with:
module-path: module-arm64.tar.gz
Expand Down

0 comments on commit 836b0b6

Please sign in to comment.