Repository navigation
51 lines (43 loc) · 1.67 KB
/
Copy pathcreate-release.yml
File metadata and controls
51 lines (43 loc) · 1.67 KB
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
---
# https://github.com/wayofdev/gh-actions/blob/master/.github/workflows/create-release.yml
# https://github.com/google-github-actions/release-please-action#release-types-supported
# https://github.com/googleapis/release-please/blob/main/docs/customizing.md
on: # yamllint disable-line rule:truthy
push:
branches:
- 1.x
name: 📦 Create release
permissions:
contents: write
pull-requests: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: 🎉 Create release
uses: googleapis/release-please-action@v5
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: .github/.release-please-config.json
manifest-file: resources/version.json
target-branch: 1.x
# The Vibe Index badge rides along in the release pull request instead of
# landing on 1.x by itself: one badge commit per release rather than one
# per push. Checking the pull request branch out is what puts the commit
# there — the action pushes to whatever HEAD points at.
- name: 📦 Check out the release pull request branch
uses: actions/checkout@v6
if: ${{ steps.release.outputs.prs_created == 'true' }}
with:
# The score is read from the commit history; a shallow clone would
# score whatever slice of it the runner happened to fetch.
fetch-depth: 0
ref: ${{ fromJson(steps.release.outputs.pr).headBranchName }}
- name: ✨ Refresh the Vibe Index badge
uses: roxblnfk/action-vibe-index@v1
if: ${{ steps.release.outputs.prs_created == 'true' }}
with:
commit: true
push: true
...