-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (60 loc) · 1.77 KB
/
cd.yml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Continuous Deployment
on:
push:
tags:
- "*.*.*"
# We need this to be able to create releases.
permissions:
contents: write
jobs:
generate-changelog:
name: Generate changelog
runs-on: ubuntu-latest
outputs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate a changelog
uses: orhun/git-cliff-action@main
id: git-cliff
with:
config: cliff.toml
args: --latest --no-exec --github-repo ${{ github.repository }}
env:
OUTPUT: CHANGES.md
github-release:
name: Github Release
runs-on: ubuntu-latest
needs: generate-changelog
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
release_body="${{ needs.generate-changelog.outputs.release_body }}"
gh release create ${{ github.ref_name }} --verify-tag --notes "$release_body"
publish-crates-io:
name: Publish on crates.io
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: |
cargo publish -p jarust_rt --token ${CRATES_TOKEN}
cargo publish -p jarust_transport --token ${CRATES_TOKEN}
cargo publish -p jarust --token ${CRATES_TOKEN}
cargo publish -p jarust_plugins --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}