forked from opensearch-project/spring-data-opensearch
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.79 KB
/
Copy pathrelease-drafter.yml
File metadata and controls
44 lines (42 loc) · 1.79 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
name: Release drafter
# Push events to every tag not containing "/"
on:
push:
tags:
- "*"
jobs:
draft-a-release:
if: github.repository == 'opensearch-project/spring-data-opensearch'
name: Draft a release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- id: get_data
run: |
echo "approvers=$(cat .github/CODEOWNERS | grep @ | tr -d '*\n ' | sed 's/@/,/g' | sed 's/,//1')" >> $GITHUB_OUTPUT
echo "version=$(cat version.properties)" >> $GITHUB_OUTPUT
- uses: trstringer/manual-approval@74d99dff7380e3e4b122d4ededcbca2b6ce59367 # v1
with:
secret: ${{ github.TOKEN }}
approvers: ${{ steps.get_data.outputs.approvers }}
minimum-approvals: 1
issue-title: 'Release spring-data-opensearch ${{ steps.get_data.outputs.version }}'
issue-body: "Please approve or deny the release of spring-data-opensearch **TAG**: ${{ github.ref_name }} **COMMIT**: ${{ github.sha }} **VERSION** : ${{ steps.get_data.outputs.version }} "
exclude-workflow-initiator-as-approver: true
- name: Set up JDK 21
uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3
with:
java-version: 21
distribution: 'temurin'
cache: gradle
- name: Build with Gradle
run: |
./gradlew --no-daemon -Dbuild.snapshot=false publishPublishMavenPublicationToLocalRepoRepository && tar -C build -cvf artifacts.tar.gz repository
- name: Draft a release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
with:
draft: true
generate_release_notes: true
files: |
artifacts.tar.gz