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
# Release Please workflow
# https://github.com/googleapis/release-please-action
#
# This workflow:
# 1. Runs on every push to main
# 2. Analyzes conventional commits since last release
# 3. Creates/updates a Release PR with version bump and changelog
# 4. When Release PR is merged, creates a git tag and triggers publish
name: Release Please
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
# See: https://github.com/googleapis/release-please/blob/main/docs/customizing.md#rust
release-type: rust
# Use manifest mode for more control
# See: https://github.com/googleapis/release-please/blob/main/docs/manifest-releaser.md
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
# Trigger the release workflow when a release is created
# This is needed because tags created by GITHUB_TOKEN don't trigger other workflows
# See: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
publish:
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
uses: ./.github/workflows/release.yml
with:
tag: ${{ needs.release-please.outputs.tag_name }}
secrets: inherit