Skip to content

Commit

Permalink
Subcrate publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Jan 27, 2024
1 parent d5056db commit 0afe47b
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/publish-crate-dry-run.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PublishDryRunCrate
name: PublishCrateDryRun

on:
workflow_dispatch:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/publish-crate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: PublishCrate

on:
workflow_dispatch:
inputs:
crate:
required: true
type: choice
description: Crate to publish
options:
- embedded-nal-async-xtra
- edge-std-nal-async
- edge-captive
- edge-dhcp
- edge-http
- edge-mdns
- edge-mqtt
- edge-raw
- edge-ws

env:
rust_toolchain: stable

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v2
- name: Setup | Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.rust_toolchain }}
- name: Setup | Std
run: rustup component add rust-src --toolchain ${{ env.rust_toolchain }}-x86_64-unknown-linux-gnu
- name: Setup | Set default toolchain
run: rustup default ${{ env.rust_toolchain }}
- name: Login
run: cargo login ${{ secrets.crates_io_token }}
- name: Build | Publish
run: cd "${{ github.event.inputs.crate }}"; cargo publish

0 comments on commit 0afe47b

Please sign in to comment.