Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Az107/HTeaPot
Browse files Browse the repository at this point in the history
  • Loading branch information
Az107 committed Jun 14, 2024
2 parents c000535 + 0ff0fc7 commit ca96a5c
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish to crates.io

on:
push:
tags:
- 'v*.*.*'

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Cache cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Build and test
run: cargo test --release

- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
run: cargo publish --no-verify

0 comments on commit ca96a5c

Please sign in to comment.