This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
#103 Changing UBI version. #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: "release-${{ env.RELEASE_VERSION }}" | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag_name: "release-${{ env.RELEASE_VERSION }}" | |
#upload_url: ${{ steps.create_release.outputs.upload_url }} | |
files: ./opensearch-ubi-plugin-${{ env.RELEASE_VERSION }}.zip | |
name: ${{ env.RELEASE_VERSION }} |