Skip to content

Commit 7ec212a

Browse files
authored
add publish step (#54)
1 parent 76d5cd7 commit 7ec212a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish to crates.io
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
if: github.repository_owner == 'viamrobotics'
10+
runs-on: [self-hosted, x64]
11+
container:
12+
image: ghcr.io/viamrobotics/canon:amd64
13+
14+
steps:
15+
- name: Check if organization member
16+
id: is_organization_member
17+
if: github.event_name == 'workflow_dispatch'
18+
uses: jamessingleton/[email protected]
19+
with:
20+
organization: viamrobotics
21+
username: ${{ github.actor }}
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
24+
- name: cancelling
25+
uses: andymckay/[email protected]
26+
if: |
27+
github.event_name == 'workflow_dispatch' && steps.is_organization_member.outputs.result == 'false'
28+

0 commit comments

Comments
 (0)