Merge pull request #31 from metabolicdata/hotfix/glue_crawler #40
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: Deploy CI | |
on: | |
push: | |
branches: | |
- main | |
release: | |
types: published | |
jobs: | |
assembly: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '8' | |
distribution: 'adopt' | |
- name: Build artifact | |
run: sbt assembly | |
- name: Upload output jar | |
uses: actions/upload-artifact@v2 | |
with: | |
name: jar | |
path: target/scala-2.12/metabolic-core-assembly-SNAPSHOT.jar | |
- name: Upload output entrypoint | |
uses: actions/upload-artifact@v2 | |
with: | |
name: em_entrypoint | |
path: src/main/scala/MapperEntrypoint.scala | |
deploy-latest: | |
needs: assembly | |
if: ${{ github.ref == 'refs/heads/main' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download em_entrypoint | |
uses: actions/download-artifact@v2 | |
with: | |
name: em_entrypoint | |
- name: Upload EM Entrypoint file to S3 | |
uses: a-sync/s3-uploader@master | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: 'eu-central-1' | |
S3_BUCKET: ${{ secrets.AWS_BUCKET }} | |
S3_KEY: platform/core/latest/MapperEntrypoint.scala | |
FILE: ./MapperEntrypoint.scala | |
- name: Download jar | |
uses: actions/download-artifact@v2 | |
with: | |
name: jar | |
- name: Upload jar artifact file to S3 | |
uses: a-sync/s3-uploader@master | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: 'eu-central-1' | |
S3_BUCKET: ${{ secrets.AWS_BUCKET }} | |
S3_KEY: platform/core/latest/metabolic-core-assembly.jar | |
FILE: ./metabolic-core-assembly-SNAPSHOT.jar | |
deploy-release: | |
needs: assembly | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git branch name | |
uses: EthanSK/git-branch-name-action@v1 | |
- name: Download em_entrypoint | |
uses: actions/download-artifact@v2 | |
with: | |
name: em_entrypoint | |
- name: Upload EM Entrypoint file to S3 | |
uses: a-sync/s3-uploader@master | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: 'eu-central-1' | |
S3_BUCKET: ${{ secrets.AWS_BUCKET }} | |
S3_KEY: ${{ format('platform/core/{0}/MapperEntrypoint.scala', env.GIT_BRANCH_NAME) }} | |
FILE: ./MapperEntrypoint.scala | |
- name: Download jar | |
uses: actions/download-artifact@v2 | |
with: | |
name: jar | |
- name: Upload jar artifact file to S3 | |
uses: a-sync/s3-uploader@master | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: 'eu-central-1' | |
S3_BUCKET: ${{ secrets.AWS_BUCKET }} | |
S3_KEY: ${{ format('platform/core/{0}/metabolic-core-assembly.jar', env.GIT_BRANCH_NAME) }} | |
FILE: ./metabolic-core-assembly-SNAPSHOT.jar |