Skip to content

Commit 3ab946a

Browse files
committed
GHA: Add deploy-release workflow
Change-Id: I7f41c4ea2e428df720fb4d85ffea75c0dea201ca Reviewed-on: https://review.couchbase.org/c/couchbase-elasticsearch-connector/+/235678 Tested-by: Build Bot <[email protected]> Reviewed-by: David Nault <[email protected]>
1 parent e329fc5 commit 3ab946a

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Maven Deploy Release
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
6+
on:
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
type: string
11+
description: Tag to release. Must already exist.
12+
required: true
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
id-token: write
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
ref: ${{ inputs.tag }}
25+
26+
- name: Verify the ref is actually a tag
27+
run: git tag --list | grep --line-regexp ${{ inputs.tag }}
28+
29+
- uses: actions/setup-java@v4
30+
with:
31+
java-version: '21'
32+
distribution: 'temurin'
33+
cache: 'gradle'
34+
35+
- uses: aws-actions/configure-aws-credentials@v3
36+
with:
37+
role-to-assume: arn:aws:iam::786014483886:role/SDK_GHA
38+
aws-region: us-west-1
39+
40+
- name: Build and publish
41+
run: |
42+
./gradlew clean build
43+
VERS=${{ inputs.tag }}
44+
ARTIFACT=couchbase-elasticsearch-connector-${VERS}.zip
45+
aws s3 cp --acl public-read build/distributions/${ARTIFACT} s3://packages.couchbase.com/clients/connectors/elasticsearch/${VERS}/${ARTIFACT}

0 commit comments

Comments
 (0)