Skip to content

Release

Release #83

Workflow file for this run

name: Release
on: [workflow_dispatch]
env:
DOCKER_REGISTRY: docker-public.terrestris.de/terrestris
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout ๐Ÿ”ฐ
uses: actions/checkout@v2
- name: Setup Node.js ๐Ÿงฎ
uses: actions/setup-node@v1
with:
node-version: 18
- name: Install dependencies โฌ
run: npm ci
- name: Build (dist) artifacts ๐Ÿ—๏ธ
run: npm run build:dist
- name: Semantic Release ๐Ÿš€
uses: cycjimmy/semantic-release-action@v3
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GH_API_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
semantic_version: 19
- name: Login to Nexus โŒจ๏ธ
uses: docker/login-action@v1
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ secrets.NEXUS_USERNAME }}
password: ${{ secrets.NEXUS_PASSWORD }}
- name: Build docker image (latest) ๐Ÿ—๏ธ
uses: docker/build-push-action@v2
with:
context: .
tags: |
${{ env.DOCKER_REGISTRY }}/shogun-gis-client:latest
load: true
- name: Build docker image (version) ๐Ÿ—๏ธ
if: steps.semantic.outputs.new_release_published == 'true'
uses: docker/build-push-action@v2
with:
context: .
tags: |
${{ env.DOCKER_REGISTRY }}/shogun-gis-client:${{ steps.semantic.outputs.new_release_version }}
load: true
- name: Push docker image to Nexus (latest) ๐Ÿ“ 
run: |
docker push ${{ env.DOCKER_REGISTRY }}/shogun-gis-client:latest
- name: Push docker image to Nexus (version) ๐Ÿ“ 
if: steps.semantic.outputs.new_release_published == 'true'
run: |
docker push ${{ env.DOCKER_REGISTRY }}/shogun-gis-client:${{ steps.semantic.outputs.new_release_version }}
- name: Build docker image e2e-tests (latest) ๐Ÿ—๏ธ
uses: docker/build-push-action@v2
with:
file: Dockerfile.e2e
context: .
tags: |
${{ env.DOCKER_REGISTRY }}/shogun-gis-client-e2e-tests:latest
load: true
- name: Build docker image e2e-tests (version) ๐Ÿ—๏ธ
if: steps.semantic.outputs.new_release_published == 'true'
uses: docker/build-push-action@v2
with:
file: Dockerfile.e2e
context: .
tags: |
${{ env.DOCKER_REGISTRY }}/shogun-gis-client-e2e-tests:${{ steps.semantic.outputs.new_release_version }}
load: true
- name: Push docker image to Nexus e2e-tests (latest) ๐Ÿ“ 
run: |
docker push ${{ env.DOCKER_REGISTRY }}/shogun-gis-client-e2e-tests:latest
- name: Push docker image to Nexus e2e-tests (version) ๐Ÿ“ 
if: steps.semantic.outputs.new_release_published == 'true'
run: |
docker push ${{ env.DOCKER_REGISTRY }}/shogun-gis-client-e2e-tests:${{ steps.semantic.outputs.new_release_version }}