Skip to content

Commit

Permalink
Adding release workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzonthemtn committed Feb 16, 2024
1 parent fa89fa0 commit a1aaecd
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 10 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Run CI tests with Gradle
name: Build and Test
on:
push:
branches: [ main ]
Expand All @@ -24,10 +22,3 @@ jobs:
# run: ./gradlew publishPluginZipPublicationToSnapshotsRepository
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./build/distributions/opensearch-ubl.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Make zip for release
on:
release:
types:
- created
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew -Dtests.security.manager=false clean test
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./build/distributions/opensearch-ubl.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit a1aaecd

Please sign in to comment.