lhisp-oauth-client/bitbucket-pipelines.yml
Leandro Costa 355372b209
Some checks failed
CI Pipeline / check-version (push) Successful in 17s
CI Pipeline / build-and-test (push) Failing after 1m36s
CI Pipeline / publish-to-npm (push) Has been skipped
CI Pipeline / publish-to-git (push) Has been skipped
feat: forgejo ci
2025-06-27 10:52:41 -03:00

53 lines
1.3 KiB
YAML

image: node:18-alpine
definitions:
steps:
- step: &build-and-test
name: Build and Test
caches:
- node
script:
- npm install
- npm run test
- npm run build
artifacts:
- dist/**
pipelines:
branches:
default:
<<: *build-and-test
"{development,release-no-verify/*}":
- step: *build-and-test
- step:
name: Prepare Package
script:
- apk add git
- npm version patch -m "[skip CI] Version %s"
- cp package.json dist/
- sed -i s/$BITBUCKET_REPO_SLUG/$BITBUCKET_REPO_SLUG-dev/ dist/package.json
- git push
artifacts:
- dist/**
- step:
name: Publish
deployment: staging
script:
- pipe: atlassian/npm-publish:0.2.0
variables:
NPM_TOKEN: $NPM_TOKEN
FOLDER: dist
master:
- step: *build-and-test
- step:
name: Prepare Package
script:
- cp package.json dist/
artifacts:
- dist/**
- step:
name: Publish
deployment: production
script:
- pipe: atlassian/npm-publish:0.2.0
variables:
NPM_TOKEN: $NPM_TOKEN
FOLDER: dist