Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 0 additions & 110 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1371,113 +1371,3 @@ steps:
- PACKAGE_VERSION
commands:
- if [ -n "$PACKAGE_VERSION" ]; then npm deprecate @iexec/dataprotector@$PACKAGE_VERSION ""; else echo "PACKAGE_VERSION is not set"; fi

---
kind: pipeline
type: docker
name: dataprotector-deserializer publish npm

trigger:
event:
- promote
target:
# publish the package @iexec/dataprotector-deserializer on npm with the tag nightly
- dataprotector-deserializer-publish-nightly
# publish the package @iexec/dataprotector-deserializer on npm with the tag latest
- dataprotector-deserializer-publish-latest
branch:
- develop
- main

steps:
- name: build test dependency dataprotector-sdk
image: node:18
pull: always
commands:
- cd packages/sdk
- npm ci
- npm run codegen
- npm run build

- name: install
image: node:18
pull: always
commands:
- cd packages/dataprotector-deserializer
- node -v
- npm -v
- npm ci
- npm run test:prepare

- name: format
image: node:18
commands:
- cd packages/dataprotector-deserializer
- npm run check-format

- name: lint
image: node:18
commands:
- cd packages/dataprotector-deserializer
- npm run lint

- name: check-types
image: node:18
commands:
- cd packages/dataprotector-deserializer
- npm run check-types

- name: test
image: node:18
commands:
- cd packages/dataprotector-deserializer
- npm run test

- name: build
image: node:18
commands:
- cd packages/dataprotector-deserializer
- npm run build

- name: set nightly version
image: node:18.19
commands:
- cd packages/dataprotector-deserializer
- eval npm pkg set version="$(npm pkg get version)-nightly-$DRONE_COMMIT"
when:
branch:
- develop
target:
- dataprotector-deserializer-publish-nightly

- name: npm publish nightly
image: plugins/npm
settings:
username:
from_secret: npm_username
token:
from_secret: npm_token_dataprotector_deserializer
tag: nightly
access: public
folder: packages/dataprotector-deserializer
when:
branch:
- develop
target:
- dataprotector-deserializer-publish-nightly

- name: npm publish latest
image: plugins/npm
settings:
username:
from_secret: npm_username
token:
from_secret: npm_token_dataprotector_deserializer
tag: latest
access: public
folder: packages/dataprotector-deserializer
when:
branch:
- main
target:
- dataprotector-deserializer-publish-latest
24 changes: 24 additions & 0 deletions github/workflows/publish-npm-deserializer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish Package NPM

on:
workflow_dispatch:
inputs:
tag:
description: 'NPM tag to publish (latest or nightly)'
required: true
type: choice
options:
- latest
- nightly
default: nightly # Check this with the team

jobs:
publish-npm:
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/publish-npm.yml@publish-npm-v1.0.0
with:
scope: '@iexec/deserializer'
registry: 'https://registry.npmjs.org'
node-version: '18'
environment: ${{ inputs.tag == 'latest' ? 'production' : 'staging' }}
secrets:
npm-token: ${{ secrets.NPM_TOKEN }}