-
Notifications
You must be signed in to change notification settings - Fork 273
82 lines (72 loc) · 2.73 KB
/
release-stable.yaml
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
name: Release Stable Version
on:
workflow_dispatch:
inputs:
release_type:
description: 'Release Type: use patch | minor | major or leave empty for auto'
required: false
default: ''
prerelease:
type: boolean
description: 'pre-release'
required: false
default: false
jobs:
build-and-release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
issues: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
fetch-depth: 0
- uses: actions/[email protected]
with:
node-version: 22
cache: 'yarn'
- name: Install
run: yarn --frozen-lockfile
- name: Version Bump
env:
NPM_USERNAME: ${{ secrets.NPM_USER }}
NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_AUTH_TOKEN }}
GH_TOKEN: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
run: |
npm config set //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}
git config user.name "${{ secrets.UI5_WEBCOMP_BOT_NAME }}"
git config user.email "${{ secrets.UI5_WEBCOMP_BOT_EMAIL }}"
yarn lerna version ${{ github.event.inputs.release_type }}\
${{ (github.event.inputs.prerelease == 'true' && '--conventional-prerelease --force-publish') || '--conventional-graduate --force-conventional-graduate' }} \
--yes --exact --create-release github
- name: Build
run: yarn ci:releasebuild
- name: Publish
env:
NPM_USERNAME: ${{ secrets.NPM_USER }}
NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_AUTH_TOKEN }}
GH_TOKEN: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
run: yarn lerna publish from-git --yes
- name: Publish Release Comments
uses: actions/github-script@v7
env:
NODE_OPTIONS: '--max-old-space-size=12096'
GH_TOKEN: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
with:
github-token: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
script: |
const commentOnFixedIssues = (await import('${{ github.workspace }}/.github/actions/commentOnFixedIssues.mjs')).default;
await commentOnFixedIssues({ github, context });
- name: Merge Release Changelog
uses: actions/github-script@v7
env:
GH_TOKEN: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
with:
github-token: ${{ secrets.UI5_WEBCOMP_BOT_GH_TOKEN }}
script: |
const mergeReleaseChangelog = (await import('${{ github.workspace }}/.github/actions/mergeReleaseChangelog.mjs')).default;
await mergeReleaseChangelog({ github , context });