Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RSDK-9933] update github action for new release format #29

Merged
merged 3 commits into from
Feb 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
# see https://github.com/viamrobotics/build-action for help
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
release:
types: [published]

jobs:
validate-tag: # Make sure we're publishing a tag that looks like semantic versioning
runs-on: ubuntu-latest
steps:
- name: Validate tag format
run: |
TAG="${{ github.event.release.tag_name }}"
echo "Validating tag: '$TAG'"
if [[ $TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]*)?$ ]]; then
echo "Tag matches semver."
else
echo "Error: tag does not match semver."
exit 1
fi

publish:
runs-on: ubuntu-latest
needs: [validate-tag]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: viamrobotics/build-action@v1
with:
# note: you can replace this line with 'version: ""' if you want to test the build process without deploying
version: ${{ github.ref_name }}
version: ${{ github.event.release.tag_name }}
ref: ${{ github.sha }}
key-id: ${{ secrets.viam_key_id }}
key-value: ${{ secrets.viam_key_value }}