Skip to content

Release

Release #29

Workflow file for this run

name: Release
on: workflow_dispatch
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_VERSION: 18
jobs:
release:
defaults:
run:
working-directory: frontend
name: Release
runs-on: ubuntu-latest
outputs:
latest-tag-ref: ${{ steps.latest-tag.outputs.tag }}
new-tag-ref: ${{ steps.semantic-release-tag.outputs.tag }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
cache-dependency-path: 'frontend/yarn.lock'
- name: Install dependencies
run: yarn install
- name: Get latest tag
id: latest-tag
run: |
TAG=$(git describe --tags --abbrev=0)
TAG_REF=$(git show-ref --tags $TAG | cut -d" " -f2)
echo $TAG_REF
echo ::set-output name=tag::${TAG_REF}
- name: Release on GitHub
run: yarn semantic-release
- name: Get created tag
id: semantic-release-tag
run: |
TAG=$(git describe --tags --abbrev=0)
TAG_REF=$(git show-ref --tags $TAG | cut -d" " -f2)
echo $TAG_REF
echo ::set-output name=tag::${TAG_REF}
release-container-image:
needs: release
if: needs.release.outputs.new-tag-ref != needs.release.outputs.latest-tag-ref
uses: adfinis/customer-center/.github/workflows/release-container-image.yaml@main
with:
ref: ${{ needs.release.outputs.new-tag-ref }}
secrets:
AUTH_ROLE_ADMIN: ${{ secrets.AUTH_ROLE_ADMIN }}
AUTH_ROLE_EMPLOYEE: ${{ secrets.AUTH_ROLE_EMPLOYEE }}
AUTH_ROLE_CUSTOMER: ${{ secrets.AUTH_ROLE_CUSTOMER }}
TIMED_STAGING_HOST: ${{ secrets.TIMED_STAGING_HOST }}
TIMED_PROD_HOST: ${{ secrets.TIMED_PROD_HOST }}