-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (51 loc) · 1.6 KB
/
release-please.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
name: Release Please
on:
push:
branches:
- main
tags: "*"
repository_dispatch:
env:
RUST_BACKTRACE: 1
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
concurrency: release-please
steps:
- name: Install release-please
run: npm install --global [email protected]
- name: Update the Release PR
run: |
release-please release-pr \
--debug \
--token=${{ secrets.RELEASE_PLEASE_GH_TOKEN }} \
--repo-url=${{ github.repositoryUrl }} \
--config-file=.github/release-please/config.json \
--manifest-file=.github/release-please/manifest.json
- name: Publish the GitHub Release
run: |
release-please github-release \
--debug \
--token=${{ secrets.RELEASE_PLEASE_GH_TOKEN }} \
--repo-url=${{ github.repositoryUrl }} \
--config-file=.github/release-please/config.json \
--manifest-file=.github/release-please/manifest.json
publish-to-crates-io:
name: Publish to crates.io (if necessary)
runs-on: ubuntu-latest
needs:
- release
concurrency: release-please-publish-crates-io
steps:
- uses: actions/checkout@v2
- name: Setup Rust
uses: dsherret/rust-toolchain-file@v1
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Install cargo-workspaces
uses: taiki-e/install-action@v2
with:
tool: cargo-workspaces
- name: Publish
run: cargo workspaces publish --from-git --token "${{ secrets.CRATES_IO_TOKEN }}" --yes