forked from smart-grid-use-cases/excel2xml-input
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (49 loc) · 1.63 KB
/
trigger.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Trigger excel-input-release
on:
workflow_dispatch:
push:
branches:
- master
jobs:
dispatch_event:
runs-on: ubuntu-latest
name: Dispatch event
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get version info
id: tag
run: |
NEXT_VERSION=$(./get_next.sh ${{ github.repository_owner }} test-case-descriptions-excel-input)
echo "NEXT_VERSION: ${NEXT_VERSION}"
echo ::set-output name=next-release::${NEXT_VERSION}
- name: Create Archive
id: create-archive
run: |
pushd excel-test-cases && zip ../erigrid2-test-cases -r . && popd
- name: Create Release
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.next-release }}
release_name: ${{ steps.tag.outputs.next-release }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ./erigrid2-test-cases.zip
asset_name: erigrid2-test-cases.zip
asset_content_type: application/zip
- uses: peter-evans/repository-dispatch@v1
with:
event-type: release_event
token: ${{ secrets.REPO_TRIGGER_KEY }}
repository: "${{ github.repository_owner }}/test-case-descriptions-excel2md"
client-payload: '{"tag": "${{ steps.tag.outputs.next-release }}" }'