-
Notifications
You must be signed in to change notification settings - Fork 2k
32 lines (27 loc) · 1.05 KB
/
start-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
# Starts a release for the given ref on the Glue API
name: Start Release
on:
workflow_dispatch:
release:
types: [published]
permissions:
id-token: write
contents: read
jobs:
start_release:
name: Starts release process in Glue API
runs-on: [glue-notify]
steps:
- name: Set Env
uses: Chia-Network/actions/setjobenv@main
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: Chia-Network/actions/github/jwt@main
- name: Start pre-release
if: "github.event.release.prerelease"
run: |
curl -s -XPOST -H "Authorization: Bearer ${{ env.JWT_TOKEN }}" --data '{"chia_ref": "${{ env.RELEASE_TAG }}"}' ${{ secrets.GLUE_API_URL }}/api/v1/${{ env.RFC_REPO }}-prerelease/${{ env.RELEASE_TAG }}/start
- name: Start release
if: "!github.event.release.prerelease"
run: |
curl -s -XPOST -H "Authorization: Bearer ${{ env.JWT_TOKEN }}" --data '{"chia_ref": "${{ env.RELEASE_TAG }}"}' ${{ secrets.GLUE_API_URL }}/api/v1/${{ env.RFC_REPO }}/${{ env.RELEASE_TAG }}/start