Skip to content

Commit

Permalink
chore(Github): workflow on release
Browse files Browse the repository at this point in the history
  • Loading branch information
itsezc committed Aug 11, 2022
1 parent 4352171 commit 351c1df
Showing 1 changed file with 47 additions and 48 deletions.
95 changes: 47 additions & 48 deletions .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,56 @@
name: cargo

on:
push:
branches:
- master
release:
types: [published]

env:
CARGO_TERM_COLOR: always
CARGO_TERM_COLOR: always

jobs:
check:
name: Rust check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check
check:
name: Rust check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check

test:
name: Rust tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
test:
name: Rust tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test

publish:
name: Build and publish
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Run cargo build
uses: actions-rs/cargo@v1
with:
command: build --release
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test --verbose
- uses: katyo/publish-crates@v1
with:
check-repo: true
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
ignore-unpublished-changes: true
publish:
name: Build and publish
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Run cargo build
uses: actions-rs/cargo@v1
with:
command: build --release
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test --verbose
- uses: katyo/publish-crates@v1
with:
check-repo: true
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
ignore-unpublished-changes: true

0 comments on commit 351c1df

Please sign in to comment.