forked from neo4j/graphql
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (38 loc) · 1.62 KB
/
release-trello-actions.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
name: "Perform actions in Trello following release"
on:
release:
types:
- published
jobs:
create-trello-list:
runs-on: ubuntu-latest
environment: trello
steps:
- name: Create list
run: |
list=$( curl --request POST \
--data-urlencode "name=Done - ${{ github.event.release.name }}" \
--data-urlencode "idBoard=${{ secrets.TEAM_GRAPHQL_BOARD }}" \
--data-urlencode "pos=bottom" \
--data-urlencode "key=${{ secrets.TRELLO_API_KEY }}" \
--data-urlencode "token=${{ secrets.TRELLO_API_TOKEN }}" \
--url "https://api.trello.com/1/lists" | jq -r .id )
echo "LIST=$list" >> "$GITHUB_ENV"
- name: Create changelog card
run: |
card=$( curl --request POST \
--data-urlencode "idList=${LIST}" \
--data-urlencode "name=Changelog" \
--data-urlencode "desc=${{ github.event.release.body }}" \
--data-urlencode "idLabels=${{ secrets.CHANGELOG_LABEL }}" \
--data-urlencode "key=${{ secrets.TRELLO_API_KEY }}" \
--data-urlencode "token=${{ secrets.TRELLO_API_TOKEN }}" \
--url "https://api.trello.com/1/cards" | jq -r .id )
echo "CARD=$card" >> "$GITHUB_ENV"
- name: Attach release
run: |
curl --request POST \
--data-urlencode "url=${{ github.event.release.html_url }}" \
--data-urlencode "key=${{ secrets.TRELLO_API_KEY }}" \
--data-urlencode "token=${{ secrets.TRELLO_API_TOKEN }}" \
--url "https://api.trello.com/1/cards/${CARD}/attachments"