-
Notifications
You must be signed in to change notification settings - Fork 4
64 lines (62 loc) · 1.71 KB
/
release.yml
File metadata and controls
64 lines (62 loc) · 1.71 KB
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
name: release
on:
workflow_dispatch:
inputs:
semver:
description: 'The semver to use'
required: true
default: 'auto'
type: choice
options:
- auto
- patch
- minor
- major
- prerelease
- prepatch
- preminor
- premajor
pull_request:
types: [closed]
jobs:
release:
if: >-
${{
(
startsWith(github.event.inputs.semver, 'pre') ||
github.ref == format(
'refs/heads/{0}',
github.event.repository.default_branch
)
) &&
(
github.event_name != 'pull_request' ||
(
github.event.pull_request.merged &&
github.event.pull_request.user.login == 'optic-release-automation[bot]'
)
)
}}
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- uses: nearform-actions/optic-release-automation-action@a2785548e8bdafab7e628c2317b604278e460434 # v4.12.2
with:
commit-message: 'Release {version}'
sync-semver-tags: false
access: 'public'
# This prefix is added before the prerelease number, e.g. `v3.0.0-next.0`
prerelease-prefix: 'next'
semver: ${{ github.event.inputs.semver }}
# Prereleases are published under the `next` npm dist-tag
npm-tag: ${{ startsWith(github.event.inputs.semver, 'pre') && 'next' || 'latest' }}
# Don't notify linked issues
notify-linked-issues: false
publish-mode: oidc
build-command: |
npm ci
npm run doc