Skip to content

Commit 54c8915

Browse files
SergioGasquezjessebraham
authored andcommitted
ci: Add publish to crates.io job
1 parent 8b628ee commit 54c8915

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,31 @@ jobs:
5353
features: ${{ matrix.platform.features }}
5454
target: ${{ matrix.platform.target }}
5555
runs_on: ${{ matrix.platform.os }}
56+
57+
58+
publish-cratesio:
59+
name: Publish to Crates.io
60+
runs-on: ubuntu-20.04
61+
steps:
62+
63+
- uses: actions/checkout@v4
64+
65+
- name: Install Rust toolchain
66+
uses: dtolnay/rust-toolchain@v1
67+
with:
68+
toolchain: stable
69+
70+
- name: Enable caching
71+
uses: Swatinem/rust-cache@v2
72+
73+
- name: Install dependencies
74+
run: sudo apt-get update && sudo apt-get install musl-tools libudev-dev
75+
76+
- name: Publish espflash
77+
run: |
78+
cd espflash
79+
cargo publish --token ${{ secrets.CARGO_API_KEY }}
80+
- name: Publish cargo-espflash
81+
run: |
82+
cd cargo-espflash
83+
cargo publish --token ${{ secrets.CARGO_API_KEY }}

0 commit comments

Comments
 (0)