-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 1007 Bytes
/
Copy pathpublish.yml
File metadata and controls
35 lines (33 loc) · 1007 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Publish to crates.io
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install cargo-edit
run: cargo install cargo-edit
- name: Set version from tag
run: |
version="${GITHUB_REF_NAME#v}"
cargo set-version "$version"
cd rquery-orm-macros
cargo set-version "$version"
- name: publish rquery-orm-macros
run: |
cd rquery-orm-macros
cargo publish --dry-run --allow-dirty
cargo publish --allow-dirty
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Validate package before publishing
run: cargo publish --dry-run --allow-dirty
- run: cargo publish --allow-dirty
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}