forked from hashicorp/terraform-provider-aws
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (63 loc) · 2.18 KB
/
post_publish.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
58
59
60
61
62
63
name: Post Publish
on:
workflow_dispatch:
inputs:
release-tag:
type: string
description: 'Semver release tag e.g. v1.1.0'
required: true
workflow_run:
workflows: [Release]
types:
- completed
jobs:
on-success-or-workflow-dispatch:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch'
outputs:
release-tag: ${{ steps.release-tag.outputs.tag }}
steps:
- if: github.event_name == 'workflow_run'
name: Download Artifact from Release workflow
uses: dawidd6/action-download-artifact@v2
with:
workflow: release.yml
name: release-tag
- name: Output Release Tag
id: release-tag
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "tag=${{ github.event.inputs.release-tag }}" >> "$GITHUB_OUTPUT"
else
value=`cat release-tag.data`
echo "tag=$value" >> "$GITHUB_OUTPUT"
fi
tidy-asana:
needs: [on-success-or-workflow-dispatch]
runs-on: ubuntu-latest
steps:
- name: Tidy Asana
uses: breathingdust/github-asana-tidy@v1
with:
asana_pat: ${{ secrets.asana_pat }}
asana_target_section_gid: '1141945723817371'
asana_workspace_gid: '90955849329269'
asana_project_gid: '632425409545160'
asana_github_url_field_gid: '1134594824474912'
github_release_name: ${{ needs.on-success-or-workflow-dispatch.outputs.release-tag }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
archive-release-cards:
needs: [on-success-or-workflow-dispatch]
runs-on: ubuntu-latest
steps:
- name: Archive Release Cards
uses: breathingdust/github-project-archive@v1
with:
github_done_column_id: 11513756
github_release_name: ${{ needs.on-success-or-workflow-dispatch.outputs.release-tag }}
github_token: ${{ secrets.ORGSCOPED_GITHUB_TOKEN }}
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'The triggering workflow failed'