forked from opensearch-project/opensearch-protobufs
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 1.97 KB
/
Copy pathpublish-release.yml
File metadata and controls
62 lines (52 loc) · 1.97 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
name: Release Workflow
# Push events to every tag not containing "/"
#
# Create artifacts for Github release and publish to public repositories
# - opensearch-protobufs-java.tar.gz (Java/Maven artifacts)
# - opensearch-protobufs-{version}.zip (Raw proto files)
# - opensearch_protobufs-{version}-py3-none-any.whl (Python/PyPI artifacts)
on:
push:
tags:
- "*"
jobs:
release:
environment: release-approval
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up JDK 21
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
with:
java-version: 21
distribution: 'temurin'
cache: gradle
- name: Set up Python 3
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: '3.10'
- name: Build with Gradle
run: |
./tools/java/package_proto_jar.sh -c true -s false
./gradlew --no-daemon -Dbuild.snapshot=false publishCreatePublicationToLocalRepoRepository
tar -C build -cvf "opensearch-protobufs-java.tar.gz" repository
- name: Create protobuf zip
run: ./tools/package_proto_zip.sh
- name: Build python with bazel
run: |
mkdir -p dist
bazel build //:opensearch_protos_wheel
mv bazel-bin/opensearch_protobufs-*-py3-none-any.whl dist/
- name: Publish python artifacts to PyPI
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
- name: Release on Github
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2
with:
draft: true
generate_release_notes: true
files: |
opensearch-protobufs-java.tar.gz
dist/opensearch_protobufs-*-py3-none-any.whl
opensearch-protobufs-*.zip