Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Updating workflow.

Updating workflow. #11

Workflow file for this run

name: Tag and publish a release
on:
push:
tags:
- 'v*.*.*'
branches: [ test-release ]
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- name: Set release version Name
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up JDK 17.0
uses: actions/setup-java@v1
with:
java-version: 17.0
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew -Dtests.security.manager=false build
- name: Rename build assets
run: cp ./build/distributions/opensearch-ubi-*.zip ./opensearch-ubi-plugin-${{ env.RELEASE_VERSION }}.zip
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
with:
artifacts: "./opensearch-ubi-plugin-${{ env.RELEASE_VERSION }}.zip"
token: ${{ secrets.GITHUB_TOKEN }}
tag: "v${{ env.RELEASE_VERSION }}"
- name: Upload Release Asset
id: upload-release-asset
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: "v${{ env.RELEASE_VERSION }}"
#upload_url: ${{ steps.create_release.outputs.upload_url }}
files: ./opensearch-ubi-plugin-${{ env.RELEASE_VERSION }}.zip
name: ${{ env.RELEASE_VERSION }}