generated from nipype/pydra-tasks-template
-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (31 loc) · 1.18 KB
/
auto-release.yaml
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
name: Generate Release
on:
repository_dispatch:
types: [create-release]
jobs:
create_release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Generate Release
run: |
# Extract necessary information from the event payload
REPO_OWNER=${{ github.event.client_payload.repo_owner }}
REPO_NAME=${{ github.event.client_payload.repo_name }}
RELEASE_TAG=${{ github.event.client_payload.release_tag }}
RELEASE_NAME=${{ github.event.client_payload.release_name }}
RELEASE_BODY=${{ github.event.client_payload.release_body }}
# Create a new release using the GitHub API
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-d '{
"tag_name": "$RELEASE_TAG",
"target_commitish": "master",
"name": "$RELEASE_NAME",
"body": "$RELEASE_BODY",
"draft": false,
"prerelease": false
}' \
"https://api.github.com/repos/nipype/pydra-#PACKAGE#/releases"