Skip to content

v0.5.1

v0.5.1 #64

Workflow file for this run

name: Publish to PyPI
on:
release:
types: [published]
jobs:
publish:
if: github.repository_owner == 'viamrobotics'
runs-on: [self-hosted, x64]
container:
image: ghcr.io/viamrobotics/canon:amd64
steps:
- name: Check if organization member
id: is_organization_member
if: github.event_name == 'workflow_dispatch'
uses: jamessingleton/[email protected]
with:
organization: viamrobotics
username: ${{ github.actor }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: cancelling
uses: andymckay/[email protected]
if: |
github.event_name == 'workflow_dispatch' && steps.is_organization_member.outputs.result == 'false'
- name: Download Release
uses: dsaltares/fetch-gh-release-asset@master
with:
file: "viam_sdk.*\\.whl"
regex: true
target: 'dist/'
version: tags/${{ github.event.release.tag_name }}
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Notify Slack
uses: slackapi/[email protected]
if: ${{ !contains(github.event.release.tag_name, 'rc') && !contains(github.event.release.tag_name, 'a') && !contains(github.event.release.tag_name, 'b')}}
with:
payload: |
{
"text": "${{ github.event.release.tag_name }} was released.\n${{ github.event.release.html_url }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}