-
Notifications
You must be signed in to change notification settings - Fork 45
106 lines (97 loc) · 4.25 KB
/
create-version-tag.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Name is optional and if present must be used
# in the url path for badges
name: Create Tag
# ONLY triggers on create-external-release trigger and
# is meant to start a new tag and update version after that
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch
# Sent from: https://github.com/marketplace/actions/repository-dispatch
on:
repository_dispatch:
types: [create-external-release]
jobs:
# publish to npm on release
# Create release action docs -> https://github.com/actions/create-release
create-tag-branch:
name: Create External Tag Branch
if: github.event.client_payload.prerelease == true
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.14]
steps:
- name: Checkout Public ZingChart Repository
uses: actions/checkout@v3
# https://github.com/marketplace/actions/create-branch
- name: Create Branch for tag
uses: peterjgrainger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.ZINGSOFT_REPOS_PERSONAL_ACCESS_TOKEN }}
with:
branch: 'canary/${{ github.event.client_payload.version }}'
create-external-release:
name: Create External Tag
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.14]
steps:
# https://github.com/actions/checkout#checkout-a-different-branch
- name: Checkout Public ZingChart Canary Branch
if: github.event.client_payload.prerelease == true
uses: actions/checkout@v3
with:
ref: 'canary/${{ github.event.client_payload.version }}'
- name: Checkout Public ZingChart Repository
if: github.event.client_payload.prerelease == false
uses: actions/checkout@v3
# https://github.com/actions/create-release
- name: Create Public Prerelease
if: github.event.client_payload.prerelease == true
id: create_prerelease
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
# context of environment variables
with:
tag_name: ${{ github.event.client_payload.version }}
name: v${{ github.event.client_payload.version }}
# Target Commish Defined here: https://developer.github.com/v3/repos/releases/#create-a-release
target_commitish: 'canary/${{ github.event.client_payload.version }}'
body: |
// @todo REPLACE ME
## Features
- xxxx`type: "bar"`
## Notable Fixes
- IOS device multiple resize events firing causing performance issues
## New Documentation
- [ZingChart Docs](https://www.zingchart.com/docs)
# draft true by default so it doesn't trigger the build directly
# needs human review
draft: true
# public release by default. Make prerelease if you want to deploy a canary version of lib
prerelease: true
- name: Create Public Release
if: github.event.client_payload.prerelease == false
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
# context of environment variables
with:
tag_name: ${{ github.event.client_payload.version }}
name: v${{ github.event.client_payload.version }}
# Target Commish Defined here: https://developer.github.com/v3/repos/releases/#create-a-release
target_commitish: 'master'
body: |
// @todo REPLACE ME
## Features
- xxxx`type: "bar"`
## Notable Fixes
- IOS device multiple resize events firing causing performance issues
## New Documentation
- [ZingChart Docs](https://www.zingchart.com/docs)
# draft true by default so it doesn't trigger the build directly
# needs human review
draft: true
# public release by default. Make prerelease if you want to deploy a canary version of lib
prerelease: false