@@ -15,39 +15,36 @@ jobs:
1515 steps :
1616 - name : Checkout code
1717 uses : actions/checkout@v4
18-
18+
1919 - name : Set up Node.js
2020 uses : actions/setup-node@v4
2121 with :
2222 node-version : ' 18'
2323 registry-url : ' https://registry.npmjs.org'
24-
25- - name : Authenticate to npm
26- run : |
27- echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
28-
24+
2925 - name : Check if package version exists
3026 working-directory : packages/sdk
3127 run : |
3228 echo "Checking if version ${{ github.event.inputs.package_version }} exists..."
3329 if npm view @iexec/dataprotector@${{ github.event.inputs.package_version }} version > /dev/null 2>&1; then
34- echo "Version ${{ github.event.inputs.package_version }} exists in registry"
30+ echo "✅ Version ${{ github.event.inputs.package_version }} exists in registry"
3531 else
36- echo "Version ${{ github.event.inputs.package_version }} does not exist in registry"
37- echo "This might be a nightly/staging version that was never published to the public registry."
32+ echo "❌ Version ${{ github.event.inputs.package_version }} does not exist in registry"
3833 echo "Available versions:"
3934 npm view @iexec/dataprotector versions --json | tail -10
4035 exit 1
4136 fi
42-
37+
4338 - name : Undeprecate package
4439 working-directory : packages/sdk
40+ env :
41+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
4542 run : |
4643 if [ -n "${{ github.event.inputs.package_version }}" ]; then
4744 echo "Removing deprecation from @iexec/dataprotector@${{ github.event.inputs.package_version }}"
4845 npm deprecate @iexec/dataprotector@${{ github.event.inputs.package_version }} ""
49- echo "Successfully removed deprecation from version ${{ github.event.inputs.package_version }}"
46+ echo "✅ Successfully removed deprecation from version ${{ github.event.inputs.package_version }}"
5047 else
51- echo "Package version is not set"
48+ echo "❌ Package version is not set"
5249 exit 1
5350 fi
0 commit comments