Skip to content

Commit

Permalink
Add GHA publish workflow (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshKarpel authored Jun 5, 2022
1 parent 47b98b1 commit 89917b4
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ updates:
directory: "/"
schedule:
interval: "weekly"
day: "tuesday"
open-pull-requests-limit: 1

- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
day: "thursday"
open-pull-requests-limit: 1
10 changes: 10 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,18 @@ on:

jobs:
pre-commit:
strategy:
fail-fast: false
matrix:
toolchain: [ stable ]

runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- uses: actions/[email protected]
- uses: pre-commit/[email protected]
20 changes: 20 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: publish

on:
release:
types: [ published ]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
- uses: actions-rs/[email protected]
with:
toolchain: stable
override: true
- uses: actions-rs/[email protected]
with:
command: publish
args: --token ${{ secrets.CRATES_TOKEN }}
17 changes: 13 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,21 @@ jobs:
fail-fast: false
matrix:
platform: [ ubuntu-latest, macos-latest, windows-latest ]
toolchain: [ stable ]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/[email protected]
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- uses: actions-rs/[email protected]
with:
toolchain: ${{ matrix.toolchain }}
override: true
- uses: actions-rs/[email protected]
with:
command: build
args: --verbose --release
- uses: actions-rs/[email protected]
with:
command: test
args: --verbose --release

0 comments on commit 89917b4

Please sign in to comment.