Merge pull request #3 from wavemaker/dev-udaya/11.9 #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
# This workflow will build connecctor and deploy in github releases when a tag is added to the repo. | |
name: connector-build-release | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Build with Maven | |
run: mvn -B install -DskipTests --file pom.xml | |
- name: Release Info | |
id: vars | |
run: | | |
echo ::set-output name=CURRENT_TAG::${GITHUB_REF#refs/*/} | |
echo ::set-output name=RELEASE_VERSION::$(cat **/src/main/resources/connector-metadata.yaml | grep "version:.*" | head -1 |awk -F'[""]' '{print $2}') | |
echo ::set-output name=RELEASE_NAME::$(cat **/src/main/resources/connector-metadata.yaml | grep "name:.*" | head -1 |awk -F'[""]' '{print $2}') | |
- name: Upload release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ github.token }} | |
file: dist/${{ steps.vars.outputs.RELEASE_NAME }}.zip | |
asset_name: ${{ steps.vars.outputs.RELEASE_NAME }}_${{ steps.vars.outputs.RELEASE_VERSION }}.zip | |
overwrite: true | |
tag: ${{ steps.vars.outputs.CURRENT_TAG }} | |
body: "${{ steps.vars.outputs.RELEASE_NAME }}_${{ steps.vars.outputs.RELEASE_VERSION }}.zip is a new release of ${{ github.event.repository.name }} connector. Please find the installation instructions of connector at https://www.wavemaker.com/learn/how-tos/" | |