Skip to content

Commit

Permalink
prepare dist as a separate job
Browse files Browse the repository at this point in the history
  • Loading branch information
seemk committed Jan 9, 2025
1 parent 6314245 commit d59e2c9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,22 @@ include:

stages:
- scan
- prepare
- checksums-sign
- release

.prepare_dist: &prepare_dist
- npm install
- npm run prepare-release-artifact
- shasum -a 256 dist/* > dist/checksums.txt

prepare:
stage: prepare
script:
- *prepare_dist

.checksums-sign: &checksums-sign
stage: checksum-sign
stage: checksums-sign
extends: .submit-signing-request
variables:
ARTIFACT: dist/checksums.txt
Expand All @@ -37,8 +44,6 @@ release:
rules:
- if: $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+.*/
script:
- *prepare_dist
- *checksums-sign
- npm run release:github
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
- npm publish ./dist/splunk-otel-${CI_COMMIT_REF_NAME:1}.tgz
Expand All @@ -53,7 +58,6 @@ prerelease:
rules:
- if: $CI_COMMIT_TAG =~ /^prerelease-v[0-9]+\.[0-9]+\.[0-9]+(?:-.+)?$/
script:
- *prepare_dist
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
- npm publish --tag prerelease ./dist/splunk-otel-${CI_COMMIT_REF_NAME:12}.tgz
- rm -f ~/.npmrc
Expand Down

0 comments on commit d59e2c9

Please sign in to comment.