File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Create Release
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ version_type :
7+ type : choice
8+ description : Semantic Version Type
9+ options :
10+ - major
11+ - minor
12+ - patch
13+ - no-version-update
14+
15+ pre_release :
16+ type : choice
17+ description : Pre Rlease?
18+ options :
19+ - stable
20+ - alpha
21+ - beta
22+ - rc
23+
24+ jobs :
25+ release-it :
26+ runs-on : ubuntu-latest
27+ steps :
28+ - uses : tibdex/github-app-token@v1
29+ id : generate-token
30+ with :
31+ app_id : ${{ secrets.RELEASE_BOT_APP_ID }}
32+ private_key : ${{ secrets.RELEASE_BOT_APP_PRIVATE_KEY }}
33+
34+ - name : checkout
35+ uses : actions/checkout@v3
36+ with :
37+ token : ${{ steps.generate-token.outputs.token }}
38+ # we need everything so release-it can compare the current version with the latest tag
39+ fetch-depth : 0
40+
41+ - name : initialize mandatory git config
42+ run : |
43+ git config user.name "GitHub Release Bot"
44+ git config user.email release-bot@neolution.ch
45+
46+ - name : install yarn packages
47+ run : |
48+ yarn --frozen-lockfile
49+
50+ - name : set NPM Token
51+ run : |
52+ echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
53+ env :
54+ NPM_TOKEN : ${{ secrets.NPM_TOKEN_NEOLUTION }}
55+
56+ - name : run release-it
57+ run : |
58+ params=()
59+
60+ if [[ ${{ github.event.inputs.version_type }} != "no-version-update" ]]; then
61+ params+=(${{ github.event.inputs.version_type }})
62+ fi
63+
64+ if [[ ${{ github.event.inputs.pre_release }} != "stable" ]]; then
65+ params+=(--preRelease=${{ github.event.inputs.pre_release }})
66+ params+=(--plugins.@release-it/keep-a-changelog.keepUnreleased)
67+ params+=(--no-plugins.@release-it/keep-a-changelog.strictLatest)
68+ fi
69+
70+ params+=(--ci)
71+
72+ yarn release-it "${params[@]}"
73+ env :
74+ GITHUB_TOKEN : ${{ steps.generate-token.outputs.token }}
You can’t perform that action at this time.
0 commit comments