Skip to content

Commit

Permalink
Update github action, use semver & new runner
Browse files Browse the repository at this point in the history
  • Loading branch information
van-sprundel authored Sep 17, 2024
1 parent 34e56f0 commit 49e1aa1
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 38 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
on:
push:
tags:
- 'v*.*.*'

name: Check buddy

jobs:
publish:
runs-on: ubuntu-latest
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
override: true

- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry
restore-keys: |
${{ runner.os }}-cargo-registry
- name: Cache Cargo index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index
restore-keys: |
${{ runner.os }}-cargo-index
- name: Test
run: cargo test --workspace

- name: Build the project
run: cargo build --release

- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish
38 changes: 0 additions & 38 deletions .github/workflows/rust-toolchain.yml

This file was deleted.

0 comments on commit 49e1aa1

Please sign in to comment.