Skip to content

Commit

Permalink
ci: introduce semantic release (#658)
Browse files Browse the repository at this point in the history
  • Loading branch information
timonmasberg authored Feb 15, 2024
1 parent c47f344 commit 31ae9bd
Show file tree
Hide file tree
Showing 8 changed files with 14,185 additions and 9,377 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
name: 'build-and-deploy-api'
description: 'Builds API project for production and deploys it to a given environment'
name: 'build-and-publish-api'
description: 'Builds API project and publish its image'

inputs:
releaseVersion:
required: true
description: "Release Version (Commit or Tag)"
deploymentEnv:
required: true
description: "Deployment Environment"
sentryAuthToken:
required: true
description: "Sentry Auth Token"
containerRegistryUrl:
required: true
description: "Container registry url"
Expand All @@ -20,13 +14,9 @@ inputs:
containerRegistryPassword:
required: true
description: "Container registry password"
containerTag:
containerTags:
required: true
description: "Container tag"
outputs:
url:
description: "API URL"
value: ${{ steps.wa-deployment.outputs.url }}
description: "Container tag or csv delimited tags"

runs:
using: "composite"
Expand Down Expand Up @@ -59,21 +49,6 @@ runs:
build-args: |
NODE_VERSION=${{ steps.node-version-check.outputs.node-version }}
push: true
tags: |
${{ inputs.containerTag }}
tags: ${{ inputs.containerTags }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Deploy API
id: wa-deployment
run: echo "url=placeholder" >> $GITHUB_OUTPUT
shell: bash
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ inputs.sentryAuthToken }}
SENTRY_ORG: kordis-leitstelle
SENTRY_PROJECT: kordis-api
with:
environment: ${{ inputs.deploymentEnv }}
version: ${{ inputs.releaseVersion }}
sourcemaps: ./dist/apps/api
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
name: 'build-and-deploy-spa'
description: 'Builds SPA project for production and deploys it to a given environment'
name: 'build-and-publish-spa'
description: 'Builds SPA project and publish its image'

inputs:
releaseVersion:
required: true
description: "Release Version (Commit or Tag)"
deploymentEnv:
required: true
description: "Deployment Environment"
sentryAuthToken:
required: true
description: "Sentry Auth Token"
containerRegistryUrl:
required: true
description: "Container registry url"
Expand All @@ -20,9 +14,9 @@ inputs:
containerRegistryPassword:
required: true
description: "Container registry password"
containerTag:
containerTags:
required: true
description: "Container tag"
description: "Container tag or csv delimited tags"
outputs:
url:
description: "SPA URL"
Expand Down Expand Up @@ -54,24 +48,6 @@ runs:
context: ./
file: ./apps/spa/docker/Dockerfile
push: true
tags: |
${{ inputs.containerTag }}
tags: ${{ inputs.containerTags }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Deploy SPA
id: spa-deployment
shell: bash
run: echo "url=placeholder" >> $GITHUB_OUTPUT
- name: Build SPA with source maps for sentry
run: npx nx build spa --prod --source-map=true
shell: bash
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ inputs.sentryAuthToken }}
SENTRY_ORG: kordis-leitstelle
SENTRY_PROJECT: kordis-spa
with:
environment: ${{ inputs.deploymentEnv }}
version: ${{ inputs.releaseVersion }}
sourcemaps: ./dist/apps/spa
77 changes: 0 additions & 77 deletions .github/workflows/next-deployment.yml

This file was deleted.

Loading

0 comments on commit 31ae9bd

Please sign in to comment.