-
Notifications
You must be signed in to change notification settings - Fork 186
76 lines (70 loc) · 2.53 KB
/
publish.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
name: 'Publish release'
run-name: Publish release ${{ inputs.package_name }} ${{ inputs.new_version }} ${{ inputs.custom_version }} (tag ${{ inputs.latest == true && 'latest' || 'legacy' }})
on:
workflow_dispatch:
inputs:
package_name:
description: "package's name:"
required: true
type: choice
options:
- '@vkontakte/vkui'
- '@vkontakte/vkui-floating-ui'
- '@vkontakte/vkui-token-translator'
- '@vkontakte/vkui-codemods'
new_version:
description: 'version type:'
required: true
type: choice
default: 'minor'
options:
- patch
- minor
- major
custom_version:
description: 'use syntax x.y.z, without "v" (it will ignore "version type" parameter):'
required: false
close_milestone:
description: 'whether to close associated milestone after publish'
type: boolean
default: true
latest:
description: 'set latest tag'
type: boolean
default: true
jobs:
publish:
concurrency: ci-gh-pages
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.DEVTOOLS_GITHUB_TOKEN }}
- name: Setting up the repository environment
uses: ./.github/actions/publish-workflow-1-setup
- name: Bump version
id: updated_versions_info
uses: ./.github/actions/publish-workflow-2-bump-version
with:
package_name: ${{ inputs.package_name }}
new_version: ${{ inputs.custom_version || inputs.new_version }}
- name: Run pre-publish checks
uses: ./.github/actions/publish-workflow-3-validation
with:
package_name: ${{ inputs.package_name }}
- name: Complete publish
id: complete_publish
uses: ./.github/actions/publish-workflow-4-complete
with:
branch: ${{ github.ref }}
prev_version: ${{ steps.updated_versions_info.outputs.prev_version }}
next_version: ${{ steps.updated_versions_info.outputs.next_version }}
package_name: ${{ inputs.package_name }}
token: ${{ secrets.DEVTOOLS_GITHUB_TOKEN }}
npm_token: ${{ secrets.NPMJS_PUBLISH_TOKEN }}
npm_tag: ${{ inputs.latest == true && 'latest' || 'legacy' }}
close_milestone: ${{ inputs.close_milestone == true }}
disable_git_tag_with_namespace: ${{ inputs.package_name == '@vkontakte/vkui' }}