-
Notifications
You must be signed in to change notification settings - Fork 147
90 lines (83 loc) · 2.83 KB
/
release-please.yaml
File metadata and controls
90 lines (83 loc) · 2.83 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: release-please
on:
push:
branches:
- master
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
paths_released: ${{ steps.release.outputs.paths_released }}
releases_info: ${{ toJSON(steps.release.outputs) }}
steps:
- uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4
id: release
with:
# path: mailu
# release-type: helm
# package-name: mailu
# monorepo-tags: true
token: ${{ secrets.GITHUB_TOKEN }}
# changelog-notes-type: github
# prerelease: true
include-v-in-tag: false
tag-separator: '-'
command: manifest
# Only check the last 50 commits to avoid rate limiting
commit-search-depth: 50
- run: echo $JSON
name: Release Please Output Info
env:
JSON: ${{ toJSON(steps.release.outputs) }}
packages-calculate:
if: needs.release-please.outputs.paths_released != '[]'
name: Packages Calculate
needs:
- release-please
runs-on: ubuntu-latest
outputs:
result: ${{ steps.interrogate.outputs.result }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- id: interrogate
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
env:
PATHS_RELEASED: ${{ needs.release-please.outputs.paths_released }}
RELEASES_INFO: ${{ needs.release-please.outputs.releases_info }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { PATHS_RELEASED, RELEASES_INFO } = process.env
const releases = JSON.parse(PATHS_RELEASED)
const releasesInfo = JSON.parse(RELEASES_INFO)
const result = []
for(const release of releases){
result.push(
{
name: release,
version: releasesInfo[`${release}--version`]
}
)
}
return result
packages-publish:
needs:
- packages-calculate
name: Charts Packages Publish
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.packages-calculate.outputs.result) }}
steps:
- name: Workflow publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
https://api.github.com/repos/${{ github.repository }}/actions/workflows/publish-chart.yaml/dispatches \
-d '{"ref":"master","inputs":{"package":"${{ matrix.package.name }}","version":"${{ matrix.package.version }}"}}'