Skip to content

update versions to v0.10.1 #26

update versions to v0.10.1

update versions to v0.10.1 #26

name: Release @teamhanko/hanko-elements
on:
push:
tags:
- '@teamhanko/hanko-elements@*'
defaults:
run:
working-directory: frontend/elements
jobs:
check-matching-versions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@main
with:
path: frontend/elements
- run: |
version=$(echo $GITHUB_REF | cut -f3 -d'@')
echo "git_tag_version=$version" >> $GITHUB_OUTPUT
id: tag-version
- run: echo ${{ steps.tag-version.outputs.git_tag_version }}
- name: Version correctly set check
if: steps.package-version.outputs.current-version != steps.tag-version.outputs.git_tag_version
uses: actions/github-script@v7
with:
script: |
core.setFailed('version in package.json is not equal to git tag version!')
build-and-publish:
needs: check-matching-versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: build-frontend-sdk
run: |
npm ci
npm run build
working-directory: frontend/frontend-sdk
- name: build-elements
run: |
npm ci
npm run build
- name: publish-elements
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISHING_SECRET }}