-
Notifications
You must be signed in to change notification settings - Fork 10
47 lines (41 loc) · 1.36 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
# This workflow creates a running release please PR, which tracks all changes
# based on semantic PR titles. When that PR is merged, a publish occurs after
# release please increments the version.
on:
push:
branches:
- main
name: Run Release Please
permissions:
contents: read
jobs:
release-please:
permissions:
contents: write # for google-github-actions/release-please-action to create release commit
pull-requests: write # for google-github-actions/release-please-action to create release PR
runs-on: ubuntu-latest
# Release-please creates a PR that tracks all changes
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
command: manifest
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main
outputs:
release_created: ${{ steps.release.outputs.release_created }}
release_tag_name: ${{ steps.release.outputs.tag_name }}
cargo-publish:
needs: release-please
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.release_created }}
steps:
- name: checkout
uses: actions/checkout@v4
with:
ref: ${{ needs.release-please.outputs.release_tag_name }}
- name: Publish
run: |
cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}