Skip to content

Commit

Permalink
fix: auto publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
FMotalleb committed Aug 26, 2024
1 parent 939a1c5 commit d52a0f1
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
---
on: workflow_dispatch
name: Publish Crate

on:
push:
branches:
- main
paths:
- Cargo.tom
release:
workflow_dispatch:


jobs:
publish:
name: Publish to crates.io
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Login
run: cargo login ${{ secrets.CARGO_KEY }}
- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Push
run: cargo publish

- name: Publish to crates.io
uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 comments on commit d52a0f1

Please sign in to comment.