-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (34 loc) · 1.15 KB
/
gitlab-sdk-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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@v4
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://npm.pkg.github.com
cache: yarn
- run: |
npm config set ${REGISTRY}:_authToken ${{ secrets.GITLAB_PACKAGE_TOKEN }}
npm config set @delandlabs: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.1.0-alpha.$(date +"%Y%m%d%H%M%S")
else
Version=$(git describe --tags --abbrev=0)
fi
echo Version: $Version
export VITE_RELEASE_VERSION=$Version
yarn install --frozen-lockfile
yarn build:sdk
yarn publish --frozen-lockfile --non-interactive --no-git-tag-version --no-commit-hooks --new-version ${Version} packages/sdk