Skip to content

Commit

Permalink
Testing github action to release the crate
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsnaps committed Oct 21, 2022
1 parent aafb951 commit 782b01d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Release crate

on:
workflow_dispatch:
inputs:
version:
description: "version (no `v` prefix)"
required: true
default: "1.0.0"

jobs:
publish:
name: Publish Limitador crate to crates.io
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: crate-v${{ github.event.inputs.version }}
- name: Build
run: cargo build --verbose --release
- name: Check
run: cargo fmt --all -- --check && cargo clippy -- -D warnings
- name: Run tests
run: cargo test --verbose
- name: Publish
if: ${{ success() }}
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} -p limitador --dry-run

0 comments on commit 782b01d

Please sign in to comment.