This repository has been archived by the owner on Jan 17, 2023. It is now read-only.
generated from wuespace/telestion-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (66 loc) · 2.42 KB
/
release-protected-branch.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
# Before testing this workflow, please create a personal access token with following scopes:
# - repo
# - workflow
# - write:packages
# - delete:packages
# - user:email
# and name it "GH_RELEASE_TOKEN".
#
# Please take a short look at the conventional commits specification before using this action:
# https://www.conventionalcommits.org/en/v1.0.0/
#
# ******** NOTE ********
# If your repository default branch is **NOT** restricted,
# please use the default release workflow instead.
name: Release
# Events that trigger this workflow
on: [workflow_dispatch]
jobs:
conventional-release:
name: Conventional Commit Release
runs-on: ubuntu-latest
steps:
- name: Checkout 📥
uses: actions/[email protected]
with:
persist-credentials: false
fetch-depth: 0
- name: Conventional Changelog Action 🎉
id: changelog
uses: TriPSs/[email protected]
with:
github-token: ${{ secrets.GH_RELEASE_TOKEN }}
git-user-name: ${{ github.actor }}
git-user-email: "${{ github.actor }}@users.noreply.github.com"
release-count: "0"
version-file: "./project.json"
skip-on-empty: "false"
- name: Create Release 🪡
id: create_release
uses: actions/[email protected]
if: ${{ steps.changelog.outputs.skipped == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
- name: Create build environment 🗜
run: |
echo "tag=${TAG}" >> ~/.build-env
echo "version=${VERSION}" >> ~/.build-env
echo "skipped=${SKIPPED}" >> ~/.build-env
echo "upload_url=${UPLOAD_URL}" >> ~/.build-env
echo "html_url=${HTML_URL}" >> ~/.build-env
env:
TAG: ${{ steps.changelog.outputs.tag }}
VERSION: ${{ steps.changelog.outputs.version }}
SKIPPED: ${{ steps.changelog.outputs.skipped }}
UPLOAD_URL: ${{ steps.create_release.outputs.upload_url }}
HTML_URL: ${{ steps.create_release.outputs.html_url }}
- name: Upload build environment 📤
uses: actions/[email protected]
with:
name: build-env
path: "~/.build-env"
retention-days: 1