Skip to content

Commit 4bac2fb

Browse files
committed
ci: enable manual pre-release
1 parent 0a86f34 commit 4bac2fb

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,40 @@
11
name: release
22

33
on:
4+
workflow_dispatch:
45
pull_request:
56
types: [closed]
67

78
jobs:
9+
pre-release:
10+
name: Create Pre Release
11+
if: github.event_name == 'workflow_dispatch'
12+
runs-on: ubuntu-latest
13+
steps:
14+
# Check out the `master` branch
15+
- uses: zendesk/checkout@v3
16+
# Compute the next semantic version
17+
- name: Compute release tag
18+
id: compute_tag
19+
uses: zendesk/compute-tag@v10
20+
with:
21+
github_token: ${{ github.token }}
22+
version_scheme: semantic
23+
version_type: prerelease
24+
- name: Create release
25+
id: create_release
26+
uses: zendesk/[email protected]
27+
with:
28+
tag_name: ${{ steps.compute_tag.outputs.next_tag }}
29+
release_name: ${{ steps.compute_tag.outputs.next_tag }}
30+
commitish: ${{ github.git_ref }}
31+
body: |
32+
This is a pre-release.
33+
See [changes since last release](https://github.com/${{ github.repository }}/compare/${{ steps.compute_tag.outputs.previous_tag }}..${{ steps.compute_tag.outputs.next_tag }}) for full release details.
34+
prerelease: true
35+
draft: false
36+
env:
37+
GITHUB_TOKEN: ${{ github.token }}
838
patch-release:
939
name: Create Patch Release
1040
if: (github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'patch') )

0 commit comments

Comments
 (0)