Skip to content

Commit 89917b4

Browse files
authored
Add GHA publish workflow (#12)
1 parent 47b98b1 commit 89917b4

File tree

4 files changed

+45
-4
lines changed

4 files changed

+45
-4
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ updates:
55
directory: "/"
66
schedule:
77
interval: "weekly"
8+
day: "tuesday"
89
open-pull-requests-limit: 1
910

1011
- package-ecosystem: "cargo"
1112
directory: "/"
1213
schedule:
1314
interval: "weekly"
15+
day: "thursday"
1416
open-pull-requests-limit: 1

.github/workflows/pre-commit.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,18 @@ on:
88

99
jobs:
1010
pre-commit:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
toolchain: [ stable ]
15+
1116
runs-on: ubuntu-latest
17+
1218
steps:
1319
- uses: actions/checkout@v3.0.2
20+
- uses: actions-rs/toolchain@v1
21+
with:
22+
toolchain: ${{ matrix.toolchain }}
23+
override: true
1424
- uses: actions/setup-python@v3.1.2
1525
- uses: pre-commit/action@v2.0.3

.github/workflows/publish.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: publish
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v3.0.2
13+
- uses: actions-rs/toolchain@v1.0.6
14+
with:
15+
toolchain: stable
16+
override: true
17+
- uses: actions-rs/cargo@v1.0.1
18+
with:
19+
command: publish
20+
args: --token ${{ secrets.CRATES_TOKEN }}

.github/workflows/tests.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,21 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
platform: [ ubuntu-latest, macos-latest, windows-latest ]
18+
toolchain: [ stable ]
1819

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

2122
steps:
2223
- uses: actions/checkout@v3.0.2
23-
- name: Build
24-
run: cargo build --verbose
25-
- name: Run tests
26-
run: cargo test --verbose
24+
- uses: actions-rs/toolchain@v1.0.6
25+
with:
26+
toolchain: ${{ matrix.toolchain }}
27+
override: true
28+
- uses: actions-rs/cargo@v1.0.1
29+
with:
30+
command: build
31+
args: --verbose --release
32+
- uses: actions-rs/cargo@v1.0.1
33+
with:
34+
command: test
35+
args: --verbose --release

0 commit comments

Comments
 (0)