Skip to content

Commit 3649bf2

Browse files
authored
Merge pull request #99 from lucy66hw/codex/manual-release-workflow
Make release workflow manually triggered
2 parents 829e797 + 07e1905 commit 3649bf2

1 file changed

Lines changed: 19 additions & 6 deletions

File tree

.github/workflows/publish-release.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,36 @@
11
name: Release Workflow
22

3-
# Push events to every tag not containing "/"
4-
#
5-
# Create artifacts for Github release and publish to public repositories
3+
# Triggered manually to create release artifacts:
64
# - opensearch-protobufs-java.tar.gz (Java/Maven artifacts)
75
# - opensearch-protobufs-{version}.zip (Raw proto files)
86
# - opensearch_protobufs-{version}-py3-none-any.whl (Python/PyPI artifacts)
97

108
on:
11-
push:
12-
tags:
13-
- "*"
9+
workflow_dispatch:
10+
inputs:
11+
release_tag:
12+
description: 'Release tag to create (for example, 1.6.0)'
13+
required: true
14+
type: string
15+
ref:
16+
description: 'Git ref to release from'
17+
required: false
18+
default: 'main'
19+
type: string
1420

1521
jobs:
1622
release:
1723
environment: release-approval
1824
runs-on: ubuntu-latest
1925
permissions: write-all
26+
env:
27+
RELEASE_TAG: ${{ inputs.release_tag }}
28+
RELEASE_REF: ${{ inputs.ref }}
2029
steps:
2130
- name: Checkout
2231
uses: actions/checkout@v6
32+
with:
33+
ref: ${{ env.RELEASE_REF }}
2334

2435
- name: Set up JDK 21
2536
uses: actions/setup-java@v4
@@ -54,6 +65,8 @@ jobs:
5465
- name: Release on Github
5566
uses: softprops/action-gh-release@v2
5667
with:
68+
tag_name: ${{ env.RELEASE_TAG }}
69+
target_commitish: ${{ env.RELEASE_REF }}
5770
draft: true
5871
generate_release_notes: true
5972
files: |

0 commit comments

Comments
 (0)