Skip to content

v0.55.0

v0.55.0 #142

Workflow file for this run

name: NPM Publish
on:
release:
types: [published]
permissions:
id-token: write
contents: read
jobs:
publish:
if: github.repository_owner == 'viamrobotics'
runs-on: ubuntu-latest
container:
image: ghcr.io/viamrobotics/canon:amd64
steps:
- name: Download Release
uses: dsaltares/fetch-gh-release-asset@master
with:
file: "viamrobotics\\-sdk\\-.*\\.tgz"
regex: true
target: './'
version: tags/${{ github.event.release.tag_name }}
- name: Check Files
id: release_file
run: echo "path=$(ls -1 | head -1)" >> $GITHUB_OUTPUT
- name: Which Tag
id: which_tag
shell: bash
run: |
if ${{ contains(github.event.release.tag_name, 'rc') }} ; then
echo "tag=rc" >> $GITHUB_OUTPUT
else
echo "tag=latest" >> $GITHUB_OUTPUT
fi
- uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- name: Publish
id: publish
run: npm publish ${{ steps.release_file.outputs.path }}
- name: Notify Slack
uses: slackapi/[email protected]
if: ${{ steps.publish.outputs.tag == 'latest' }}
with:
payload: |
{
"text": "${{ github.event.release.tag_name }} was released.\n${{ github.event.release.html_url }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}