diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ccc4d55..cd9e69e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,11 +17,11 @@ jobs: matrix: include: - node-version: 18.x - publish: true + publish: false - node-version: 20.x publish: true # TODO - node-version: 22.x - publish: true + publish: false env: CI: true @@ -86,27 +86,45 @@ jobs: console.log(`Release type: ${releaseType}`) return releaseType + - name: Set version from tag to environment variable + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + # TODO: Enable after reaching 1.0.0. # This may indicate that the tag set has a typo, e.g., alpah, betta, etc. # - name: Verify tag format # if: steps.check-tag-format.outputs.is_stable == 'false' && steps.get-release-type.outputs.result == 'latest' # run: echo "Tag set may be incorrect. Please, review" && exit 1 + # - name: Reset changes + # if: startsWith(github.ref, 'refs/tags/') && matrix.publish + # run: git reset --hard HEAD + + - name: Ignore changes to .yarnrc.yml + if: startsWith(github.ref, 'refs/tags/') && matrix.publish + run: git update-index --assume-unchanged .yarnrc.yml + - name: Configure yarn to publish packages if: startsWith(github.ref, 'refs/tags/') && matrix.publish env: - # The following token has been manually issued in the CartoDB - # organization for npmjs.com NODE_AUTH_TOKEN: ${{ secrets.NPM_CARTODB_AUTH_TOKEN }} run: | + # Yarn config yarn config set npmPublishRegistry "https://registry.npmjs.org/" yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" + # Create .npmrc file + echo "@carto:registry=https://registry.npmjs.org/" > .npmrc + echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc + + # Check configuration + npm config get registry + npm view @carto/create-common versions + - name: Publish package with Lerna if: startsWith(github.ref, 'refs/tags/') && matrix.publish env: RELEASE_TYPE: ${{ steps.get-release-type.outputs.result }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_CARTODB_AUTH_TOKEN }} run: | set -x - yarn lerna publish --yes --force-publish "*" --dist-tag ${RELEASE_TYPE} --no-git-tag-version - + yarn lerna publish from-git --yes --dist-tag ${RELEASE_TYPE} --loglevel verbose diff --git a/package.json b/package.json index e2611c8..ff0098f 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "clean": "rimraf --glob 'packages/*/dist/*' 'sandbox/*'", "preversion": "yarn lint", "version": "yarn clean && yarn build", - "postpublish": "git push && git push --tags" + "postversion": "git push && git push --tags" }, "devDependencies": { "@types/meow": "^6.0.0", @@ -24,7 +24,7 @@ "meow": "^13.2.0", "prettier": "^3.3.3", "rimraf": "^6.0.1", - "typescript": "^5.6.2", + "typescript": "5.5.4", "vite": "^5.4.6" }, "resolutions": { diff --git a/packages/create-angular/package.json b/packages/create-angular/package.json index 0b77a9d..6a439bf 100644 --- a/packages/create-angular/package.json +++ b/packages/create-angular/package.json @@ -4,7 +4,7 @@ "repository": "github:CartoDB/carto-app-templates", "author": "Don McCurdy <donmccurdy@carto.com>", "license": "MIT", - "version": "0.0.12", + "version": "0.0.13-0", "type": "module", "bin": "./scripts/create.js", "scripts": { @@ -25,7 +25,7 @@ "@angular/router": "^18.2.5", "@auth0/auth0-angular": "^2.2.3", "@carto/api-client": "^0.1.0", - "@carto/create-common": "^0.0.12", + "@carto/create-common": "^0.0.13-0", "@deck.gl/aggregation-layers": "^9.0.24", "@deck.gl/carto": "^9.0.24", "@deck.gl/core": "^9.0.24", @@ -49,5 +49,6 @@ "typescript": "<5.6.0" }, "packageManager": "yarn@4.2.2", - "gitHead": "eee3523a24885fe41609c9739378a10dc90dab77" + "gitHead": "eee3523a24885fe41609c9739378a10dc90dab77", + "stableVersion": "0.0.12" } diff --git a/packages/create-common/package.json b/packages/create-common/package.json index 2c37b06..dd56e71 100644 --- a/packages/create-common/package.json +++ b/packages/create-common/package.json @@ -2,7 +2,7 @@ "name": "@carto/create-common", "packageManager": "yarn@4.2.2", "author": "Don McCurdy <donmccurdy@carto.com>", - "version": "0.0.12", + "version": "0.0.13-0", "license": "MIT", "type": "module", "sideEffects": false, @@ -49,5 +49,6 @@ "@types/prompts": "^2.4.9", "microbundle": "^0.15.1" }, - "gitHead": "eee3523a24885fe41609c9739378a10dc90dab77" + "gitHead": "eee3523a24885fe41609c9739378a10dc90dab77", + "stableVersion": "0.0.12" } diff --git a/packages/create-react/package.json b/packages/create-react/package.json index 0499aac..362ec9d 100644 --- a/packages/create-react/package.json +++ b/packages/create-react/package.json @@ -4,7 +4,7 @@ "repository": "github:CartoDB/carto-app-templates", "author": "Don McCurdy <donmccurdy@carto.com>", "license": "MIT", - "version": "0.0.12", + "version": "0.0.13-0", "type": "module", "bin": "./scripts/create.js", "scripts": { @@ -17,7 +17,7 @@ "dependencies": { "@auth0/auth0-react": "^2.2.4", "@carto/api-client": "^0.1.0", - "@carto/create-common": "^0.0.12", + "@carto/create-common": "^0.0.13-0", "@deck.gl/aggregation-layers": "^9.0.24", "@deck.gl/carto": "^9.0.24", "@deck.gl/core": "^9.0.24", @@ -50,5 +50,6 @@ "vite": "^5.4.6" }, "packageManager": "yarn@4.2.2", - "gitHead": "eee3523a24885fe41609c9739378a10dc90dab77" + "gitHead": "eee3523a24885fe41609c9739378a10dc90dab77", + "stableVersion": "0.0.12" } diff --git a/packages/create-vue/package.json b/packages/create-vue/package.json index 9bd0486..c35b8c3 100644 --- a/packages/create-vue/package.json +++ b/packages/create-vue/package.json @@ -4,7 +4,7 @@ "repository": "github:CartoDB/carto-app-templates", "author": "Don McCurdy <donmccurdy@carto.com>", "license": "MIT", - "version": "0.0.12", + "version": "0.0.13-0", "type": "module", "bin": "./scripts/create.js", "scripts": { @@ -16,7 +16,7 @@ "dependencies": { "@auth0/auth0-vue": "^2.3.3", "@carto/api-client": "^0.1.0", - "@carto/create-common": "^0.0.12", + "@carto/create-common": "^0.0.13-0", "@deck.gl/aggregation-layers": "^9.0.24", "@deck.gl/carto": "^9.0.24", "@deck.gl/core": "^9.0.24", @@ -41,5 +41,6 @@ "vue-tsc": "^2.1.6" }, "packageManager": "yarn@4.2.2", - "gitHead": "eee3523a24885fe41609c9739378a10dc90dab77" + "gitHead": "eee3523a24885fe41609c9739378a10dc90dab77", + "stableVersion": "0.0.12" } diff --git a/yarn.lock b/yarn.lock index acb339d..13e43cb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2435,7 +2435,7 @@ __metadata: "@angular/router": "npm:^18.2.5" "@auth0/auth0-angular": "npm:^2.2.3" "@carto/api-client": "npm:^0.1.0" - "@carto/create-common": "npm:^0.0.12" + "@carto/create-common": "npm:^0.0.13-0" "@deck.gl/aggregation-layers": "npm:^9.0.24" "@deck.gl/carto": "npm:^9.0.24" "@deck.gl/core": "npm:^9.0.24" @@ -2457,7 +2457,7 @@ __metadata: languageName: unknown linkType: soft -"@carto/create-common@npm:^0.0.12, @carto/create-common@workspace:packages/create-common": +"@carto/create-common@npm:^0.0.13-0, @carto/create-common@workspace:packages/create-common": version: 0.0.0-use.local resolution: "@carto/create-common@workspace:packages/create-common" dependencies: @@ -2477,7 +2477,7 @@ __metadata: dependencies: "@auth0/auth0-react": "npm:^2.2.4" "@carto/api-client": "npm:^0.1.0" - "@carto/create-common": "npm:^0.0.12" + "@carto/create-common": "npm:^0.0.13-0" "@deck.gl/aggregation-layers": "npm:^9.0.24" "@deck.gl/carto": "npm:^9.0.24" "@deck.gl/core": "npm:^9.0.24" @@ -2517,7 +2517,7 @@ __metadata: dependencies: "@auth0/auth0-vue": "npm:^2.3.3" "@carto/api-client": "npm:^0.1.0" - "@carto/create-common": "npm:^0.0.12" + "@carto/create-common": "npm:^0.0.13-0" "@deck.gl/aggregation-layers": "npm:^9.0.24" "@deck.gl/carto": "npm:^9.0.24" "@deck.gl/core": "npm:^9.0.24" @@ -15326,7 +15326,7 @@ __metadata: meow: "npm:^13.2.0" prettier: "npm:^3.3.3" rimraf: "npm:^6.0.1" - typescript: "npm:^5.6.2" + typescript: "npm:5.5.4" vite: "npm:^5.4.6" languageName: unknown linkType: soft