Skip to content

Merge pull request #79 from SoftwareAG/develop #61

Merge pull request #79 from SoftwareAG/develop

Merge pull request #79 from SoftwareAG/develop #61

Workflow file for this run

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Build Mapper
on:
workflow_dispatch:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: 11
distribution: zulu
- name: Build Backend
run: mvn -B package --file pom.xml
- name: deploy
uses: actions/setup-node@v2
with:
node-version: 14.x
- run: npm i
working-directory: ./dynamic-mapping-ui
- run: npm run build --if-present
working-directory: ./dynamic-mapping-ui
- name: Zip Frontend
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
run: |
cd dynamic-mapping-ui/dist/apps/sag-ps-pkg-dynamic-mapping
zip -r -q ../../../dynamic-mapping-ui.zip *
- name: Create Release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset Frontend
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
id: upload-release-asset-frontend
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./dynamic-mapping-ui/dynamic-mapping-ui.zip
asset_name: dynamic-mapping-ui.zip
asset_content_type: application/zip
- name: Upload Release Asset Backend
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./dynamic-mapping-service/target/dynamic-mapping-service.zip
asset_name: dynamic-mapping-service.zip
asset_content_type: application/zip