ci: Add GitLab CI with semantic-release to @carealytix package registry
- .gitlab-ci.yml: single release stage, builds and runs semantic-release on main - .releaserc: commit-analyzer, release-notes, npm publish, gitlab release, git tag - package.json: rename to @carealytix/codewalkers, add repository, release script, semantic-release devDeps - README.md: add GitLab Package Registry install instructions with .npmrc config
This commit is contained in:
21
.gitlab-ci.yml
Normal file
21
.gitlab-ci.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
stages:
|
||||
- release
|
||||
|
||||
semantic-release:
|
||||
stage: release
|
||||
image: node:lts-alpine
|
||||
before_script:
|
||||
- apk add git openssh
|
||||
- mkdir -p ~/.ssh
|
||||
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
|
||||
- ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
|
||||
- chmod 600 ~/.ssh/id_ed25519
|
||||
- |
|
||||
echo "@carealytix:registry=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/npm/" >> .npmrc
|
||||
echo "//${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}" >> .npmrc
|
||||
- npm install
|
||||
- npm run build
|
||||
script:
|
||||
- npx semantic-release
|
||||
only:
|
||||
- main
|
||||
Reference in New Issue
Block a user