forked from zenstackhq/zenstack
-
-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (89 loc) · 3.84 KB
/
management-changelog.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
###
# @format
# -----
# Project: zenstack-monorepo
# File: management-changelog.yml
# Path: \.github\workflows\management-changelog.yml
# Created Date: Monday, February 19th 2024
# Author: Jonathan Stevens, [email protected]
# Github: https://github.com/TGTGamer
# -----
# Contributing: Please read through our contributing guidelines.
# Included are directions for opening issues, coding standards,
# and notes on development. These can be found at
# https://github.com/zenstack-monorepo/blob/develop/CONTRIBUTING.md
# -----
# Code of Conduct: This project abides by the Contributor Covenant, v2.0
# Please interact in ways that contribute to an open, welcoming, diverse,
# inclusive, and healthy community. Our Code of Conduct can be found at
# https://github.com/zenstack-monorepo/blob/develop/CODE_OF_CONDUCT.md
# -----
# Copyright (c) 2024 ZenstackHQ - All Rights Reserved
# LICENSE: MIT License (MIT)
# -----
# This program has been provided under confidence of the copyright holder and
# is licensed for copying, distribution and modification under the terms
# of the MIT License (MIT) published as the License,
# or (at your option) any later version of this license.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# MIT License for more details.
# You should have received a copy of the MIT License
# along with this program. If not, please write to: [email protected],
# or see https://opensource.org/licenses/MIT
# -----
# DELETING THIS NOTICE AUTOMATICALLY VOIDS YOUR LICENSE
###
on:
push:
branches:
- main # Your main branch
- dev # Your development branch
- release/* # Your releases branch
- v2 # Your current v2 branch - disabled for now because I don't know if you want to have this tag on this branch or not -_-
# TODO: Rename your V2 brach to release/v2 for proper versioning if you intend to use a Release branch method
permissions:
contents: read
name: Management - Release Workflow
jobs:
release:
permissions:
contents: write
pull-requests: write
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN || github.token }} # Bot Token is a PAT for a automation account.
runs-on: ubuntu-latest
steps:
# Harden-Runner provides runtime security for GitHub-hosted and self-hosted environments.
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit
# This tells you useful infomation about the workflow, but it's not required (hence commented out) - it's just nice to have
# - name: Workflow Telemetry
# uses: catchpoint/workflow-telemetry-action@6705383eabd01833acfe8412ec697384830e1455 # v1.8.7
# with:
# comment_on_pr: false
# theme: dark
# proc_trace_sys_enable: true
- uses: google-github-actions/release-please-action@v4
id: release
with:
config-file: '.github/release/release-main-config.json'
manifest-file: '.github/release/.release-manifest.json'
target-branch: ${{ github.ref_name == 'develop' && 'main' || github.ref_name }}
include-component-in-tag: true
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v4
if: ${{ steps.release.outputs.release_created }}
with:
node-version: 12
registry-url: 'https://registry.npmjs.org'
- run: pnpm i # Install using pnpm
if: ${{ steps.release.outputs.release_created }}
- run: pnpm publish-all # Publish using pre-defined pnpm script
if: ${{ steps.release.outputs.release_created }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}