-
Notifications
You must be signed in to change notification settings - Fork 52
38 lines (33 loc) · 1.22 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Publish to PyPI
on:
release:
types: [published]
jobs:
publish:
if: github.repository_owner == 'viamrobotics'
runs-on: ubuntu-latest
steps:
- 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 }}
verbose: true
- 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 }}",
"username": "Python SDK",
"icon_url": "https://s3.dualstack.us-east-2.amazonaws.com/pythondotorg-assets/media/community/logos/python-logo-only.png"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}