diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 17cdce3e..f71460c0 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -17,13 +17,7 @@ jobs: with: node-version: 16 registry-url: https://registry.npmjs.org/ - - - name: Extract tag - id: get_tag - run: echo ::set-output name=TAG::${GITHUB_REF#refs/tags/} - env: - GITHUB_REF: ${{ github.ref }} - - run: ./scripts/publish.sh ${{ steps.get_tag.outputs.TAG }} + - run: ./scripts/publish.sh env: NODE_AUTH_TOKEN: ${{ secrets.npm_token }} \ No newline at end of file diff --git a/packages/sc-deployer/package.json b/packages/sc-deployer/package.json index 4ddac438..2636f40b 100644 --- a/packages/sc-deployer/package.json +++ b/packages/sc-deployer/package.json @@ -1,6 +1,6 @@ { "name": "@massalabs/massa-sc-deployer", - "version": "1.3.0", + "version": "2.0.0", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/scripts/publish.sh b/scripts/publish.sh index 8910628c..c30673a9 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -4,28 +4,15 @@ set -e npm ci npm run build -ref=$1 -TAG="" -if [[ "$ref" == *"buildnet"* ]]; then - TAG="--tag buildnet" -elif [[ "$ref" == *"testnet"* ]]; then - TAG="--tag testnet" -fi - for packageDir in packages/*; do if [ -d "$packageDir" ]; then PACKAGE_NAME=$(cat "$packageDir/package.json" | jq -r '.name') PUBLISH_VERSION=$(cat "$packageDir/package.json" | jq -r '.version') - # Check if the package name is in the reference - if [[ "$ref" == *"$PACKAGE_NAME"* ]]; then - echo "Publishing ${PACKAGE_NAME}@${PUBLISH_VERSION}" - - cd $packageDir - npm publish --access public $TAG - cd ../.. - else - echo "Skipping ${PACKAGE_NAME}" - fi + echo "Publishing ${PACKAGE_NAME}@${PUBLISH_VERSION}" + + cd $packageDir + npm publish --access public --tag latest + cd ../.. fi done