-
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.15 KB
/
publish.yaml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Publish
on:
release:
types: ["published"]
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout the repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 🪄 Set the versions
run: |
sed -i -e 's/version = "0\.0\.0"/version = "${{ github.ref_name }}"/g' Cargo.toml
- name: Rustup
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: 📝 Build the changelog
id: changelog
uses: Bullrich/generate-release-changelog@master
env:
REPO: ${{ github.repository }}
- name: 🪄 Update the release
uses: tubone24/update_release@v1.3.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_name: ${{ github.ref_name }}
body: ${{ steps.changelog.outputs.changelog }}
- name: 📤 Publish the crates
run: |
cargo publish --allow-dirty
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}