Skip to content

Create Release Artifact #30

Create Release Artifact

Create Release Artifact #30

name: Create Release Artifact
on:
workflow_dispatch:
inputs:
tag:
description: 'tagname for the Artifact'
required: true
type: string
create_release:
description: 'Wether or not a release entry should be created on github'
required: false
default: true
type: boolean
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
create_image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
- name: Install JS dependencies
run: yarn --immutable
- name: Test
run: |
set -o pipefail
yarn test --coverage --coverage-reporters=lcov --detectOpenHandles=false 2>&1 | tee ./unit-tests.log
- name: Build
run: yarn build:prod
- name: Push Docker image
env:
DOCKER_PASSWORD: ${{secrets.WEBTEAM_QUAY_PASSWORD}}
DOCKER_USERNAME: ${{secrets.WEBTEAM_QUAY_USERNAME}}
run: yarn docker '' "${{inputs.tag}}"
- name: Create GitHub release
if: ${{inputs.create_release}}
id: create_release_production
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{github.token}}
with:
tag_name: ${{inputs.tag}}
name: ${{inputs.tag}}
files: ./unit-tests.log
draft: false
prerelease: true