Skip to content

feat: support to release @deland-labs/hibit-id-sdk (#39) #12

feat: support to release @deland-labs/hibit-id-sdk (#39)

feat: support to release @deland-labs/hibit-id-sdk (#39) #12

Workflow file for this run

name: publish hibit-id-sdk package to gitlab
on:
release:
types: [ published ]
push:
branches:
- main
- release
jobs:
Build-and-Publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 22
registry-url: https://npm.pkg.github.com
cache: yarn
- run: |
yarn install --frozen-lockfile
- run: |
npm config set ${REGISTRY}:_authToken ${{ secrets.GITLAB_PACKAGE_TOKEN }}
npm config set @deland-labs:registry https:${REGISTRY}
env:
REGISTRY: //gitlab.com/api/v4/projects/37663507/packages/npm/
- run: |
if [ "${{ github.ref }}" = "refs/heads/main" ] || [ "${{ github.ref }}" = "refs/heads/release" ]; then
Version=1.0.0-alpha.$(date +"%Y%m%d%H%M%S")
else
Version=$(git describe --tags --abbrev=0)
fi
echo Version: $Version
yarn publish --frozen-lockfile --non-interactive --no-git-tag-version --no-commit-hooks --new-version ${Version} packages/sdk