Skip to content

Commit

Permalink
add publish action (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
vvillait88 authored Sep 13, 2023
1 parent 43b7aba commit 7a343d0
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish Package to Crates.io

on:
release:
types: [published]

env:
CARGO_TERM_COLOR: always

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cargo build --verbose
- run: cargo test --verbose
env:
PDL_API_KEY: ${{secrets.PDL_API_KEY}}

publish-crate-io:
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 comments on commit 7a343d0

Please sign in to comment.