generated from wuespace/telestion-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (58 loc) · 2.26 KB
/
release.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
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# Before you use this workflow, please take a short look at the conventional commits specification:
# https://www.conventionalcommits.org/en/v1.0.0/
#
# ******** NOTE ********
# If your repository default branch is restricted,
# please use the release-protected-branch 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]
- name: Conventional Changelog Action 🎉
id: changelog
uses: TriPSs/[email protected]
with:
github-token: ${{ secrets.GITHUB_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.GITHUB_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