-
Notifications
You must be signed in to change notification settings - Fork 30
57 lines (54 loc) · 2.25 KB
/
cd.release.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
56
57
# Release Please Actions
name: "CD: Release Please"
on:
push:
branches:
- main
permissions:
contents: read
jobs:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
if: github.repository == 'opencadc/science-platform'
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- name: Create release
id: release-please
uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4.1.3
- name: Dispatch Edge Build
# Run this step only if the release-please completes successfully
if: steps.release-please.outcome == 'success' && github.event_name == 'push'
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3.0.0
with:
repository: opencadc/science-platform
event-type: edge-build
token: ${{ secrets.GITHUB_TOKEN }}
- name: Skaha Release Info
# Run this step only if the release-please completes successfully
if: ${{ steps.release-please.outputs.release_created == 'true' }}
run: |
echo "Releases Created: ${{ steps.release-please.outputs.release_created }}"
echo "tag: ${{ steps.release-please.outputs.tag_name }}"
echo "sha: ${{ steps.release-please.outputs.sha }}"
echo "major: ${{ steps.release-please.outputs.major }}"
echo "minor: ${{ steps.release-please.outputs.minor }}"
echo "patch: ${{ steps.release-please.outputs.patch }}"
- name: Dispatch Skaha Release Build
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3.0.0
if: ${{ steps.release-please.outputs.release_created == 'true' }}
with:
repository: opencadc/science-platform
event-type: release-build
token: ${{ secrets.GITHUB_TOKEN }}
client-payload: |-
{
"releases_created": "${{ steps.release-please.outputs.release_created }}",
"tag_name": "${{ steps.release-please.outputs.tag_name }}",
"sha": "${{ steps.release-please.outputs.sha }}"
}