-
Notifications
You must be signed in to change notification settings - Fork 24
39 lines (32 loc) · 1.02 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
39
name: Publish to crates.io
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'
- uses: actions/checkout@v3
- name: Setup rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Publish
uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CRATES_API_TOKEN }}