From cb63d9ebf6c90e3ebbda1b008dbe3e4ef65572b4 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 14:39:16 +0300 Subject: [PATCH 01/34] Fix package publishing --- .github/workflows/bump-version.yml | 24 +++++++++++++++++++++ .github/workflows/release.yml | 34 +++++++++++++++--------------- 2 files changed, 41 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/bump-version.yml diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml new file mode 100644 index 0000000..8c1e977 --- /dev/null +++ b/.github/workflows/bump-version.yml @@ -0,0 +1,24 @@ +name: Bump path version + +on: + # push: + # branches: [main] + pull_request: + +jobs: + bump-version: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + - name: Bump the version + run: npm version patch -m 'bump version to %s' + - name: Push changes + run: | + git config user.email "datalens-tech+bot@github.com" + git config user.name "Datalens-tech robot" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8477cc5..2db3b91 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,20 +16,20 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 20 - registry-url: 'https://npm.pkg.github.com' - scope: '@datalens-tech' - cache: npm - - name: Install Packages - run: npm ci - - name: Build - run: npm run build - - name: Git user configuration - run: git config user.email "datalens-tech+bot@github.com" && git config user.name "Datalens-tech robot" - - name: Publish - run: npm version patch && npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: Setup Node + # uses: actions/setup-node@v4 + # with: + # node-version: 20 + # registry-url: 'https://npm.pkg.github.com' + # scope: '@datalens-tech' + # cache: npm + # - name: Install Packages + # run: npm ci + # - name: Build + # run: npm run build + # - name: Git user configuration + # run: git config user.email "datalens-tech+bot@github.com" && git config user.name "Datalens-tech robot" + # - name: Publish + # run: npm version patch && npm publish + # env: + # NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 771f2ad5404be2cfed59b8532454ee7ad898d942 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 14:48:58 +0300 Subject: [PATCH 02/34] CI fix 1 --- .github/workflows/bump-version.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 8c1e977..b4206cf 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -16,9 +16,13 @@ jobs: with: node-version: 20 cache: npm + - name: Git user configuration + run: | + git config user.email "datalens-tech+bot@github.com" + git config user.name "Datalens-tech robot" - name: Bump the version run: npm version patch -m 'bump version to %s' - name: Push changes - run: | - git config user.email "datalens-tech+bot@github.com" - git config user.name "Datalens-tech robot" + run: git push origin HEAD --follow-tags + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 983b20c9fef994c6e439a2ea58c1a0a18e069d82 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 14:56:04 +0300 Subject: [PATCH 03/34] CI fix 2 --- .github/workflows/bump-version.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index b4206cf..409e029 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -8,6 +8,9 @@ on: jobs: bump-version: runs-on: ubuntu-latest + permissions: + contents: read + packages: write steps: - name: Checkout uses: actions/checkout@v4 From 65d9a6df811b87bb8e9ebfbc0fabc769d929ffcb Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 14:57:03 +0300 Subject: [PATCH 04/34] CI fix 3 --- .github/workflows/bump-version.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 409e029..a28364b 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -9,8 +9,8 @@ jobs: bump-version: runs-on: ubuntu-latest permissions: - contents: read - packages: write + contents: write + # packages: write steps: - name: Checkout uses: actions/checkout@v4 From ebfea6f8f050335a69fd221baba8d994b92506d5 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 15:08:08 +0300 Subject: [PATCH 05/34] CI fix 4 --- .github/workflows/bump-version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index a28364b..0c07209 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -26,6 +26,6 @@ jobs: - name: Bump the version run: npm version patch -m 'bump version to %s' - name: Push changes - run: git push origin HEAD --follow-tags + run: git push origin/main HEAD --follow-tags env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 4a7f30c9cdf3efd179d7e8c2b6c6e24db9e821f4 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 15:09:05 +0300 Subject: [PATCH 06/34] CI fix 5 --- .github/workflows/bump-version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 0c07209..9c2c1ee 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -26,6 +26,6 @@ jobs: - name: Bump the version run: npm version patch -m 'bump version to %s' - name: Push changes - run: git push origin/main HEAD --follow-tags + run: git push env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From f940f07b6c47598ae0fa28d1778dc6755db0c29f Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 17:08:33 +0300 Subject: [PATCH 07/34] CI fix 6 --- .github/workflows/bump-version.yml | 38 +++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 9c2c1ee..91e6dce 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -14,18 +14,38 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + sparse-checkout: . + fetch-depth: 0 - name: Setup Node uses: actions/setup-node@v4 with: node-version: 20 cache: npm - - name: Git user configuration + - name: 'Get last release' run: | - git config user.email "datalens-tech+bot@github.com" - git config user.name "Datalens-tech robot" - - name: Bump the version - run: npm version patch -m 'bump version to %s' - - name: Push changes - run: git push - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COMMIT_NAME=$(git log -n 1 --pretty=format:%s) + + LAST_RELEASE_VERSION=$(curl -L https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq -r '.|=sort_by(.name|ltrimstr("v")|split(".")|map(tonumber)|[.[0],.[1],-.[2]])|.[-1].name' | sed 's|v||') + echo "Last release version: ${LAST_RELEASE_VERSION}" + + MAIN_COMMIT=$(git rev-parse origin/main) + echo "Main commit: ${MAIN_COMMIT}" + LAST_RELEASE_BRANCH="release-${LAST_RELEASE_VERSION}" + LAST_RELEASE_COMMIT=$(git rev-parse "origin/$LAST_RELEASE_BRANCH") + echo "Last release commit: ${LAST_RELEASE_COMMIT}" + + if [ "$MAIN_COMMIT" = "$LAST_RELEASE_COMMIT" ]; then echo "Hash commit in main branch matches the last release branch commit" && exit 1; fi + + echo "COMMIT_NAME=$COMMIT_NAME" >> "$GITHUB_ENV" + echo "LAST_RELEASE_VERSION=$LAST_RELEASE_VERSION" >> "$GITHUB_ENV" + # - name: Git user configuration + # run: | + # git config user.email "datalens-tech+bot@github.com" + # git config user.name "Datalens-tech robot" + # - name: Bump the version + # run: npm version patch -m 'bump version to %s' + # - name: Push changes + # run: git push + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 56dfd6cbeb23cf22eeeb757b35cd983ab57aa975 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 17:16:18 +0300 Subject: [PATCH 08/34] CI fix 7 --- .github/workflows/bump-version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 91e6dce..3888a26 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -32,7 +32,7 @@ jobs: MAIN_COMMIT=$(git rev-parse origin/main) echo "Main commit: ${MAIN_COMMIT}" LAST_RELEASE_BRANCH="release-${LAST_RELEASE_VERSION}" - LAST_RELEASE_COMMIT=$(git rev-parse "origin/$LAST_RELEASE_BRANCH") + LAST_RELEASE_COMMIT=$(git rev-parse "origin/main") echo "Last release commit: ${LAST_RELEASE_COMMIT}" if [ "$MAIN_COMMIT" = "$LAST_RELEASE_COMMIT" ]; then echo "Hash commit in main branch matches the last release branch commit" && exit 1; fi From a201257584e02cf0de3cda565f8e3e27ef12d8b7 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 17:31:22 +0300 Subject: [PATCH 09/34] CI fix 7 --- .github/workflows/bump-version.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 3888a26..3990c63 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -32,20 +32,10 @@ jobs: MAIN_COMMIT=$(git rev-parse origin/main) echo "Main commit: ${MAIN_COMMIT}" LAST_RELEASE_BRANCH="release-${LAST_RELEASE_VERSION}" - LAST_RELEASE_COMMIT=$(git rev-parse "origin/main") + LAST_RELEASE_COMMIT=$(git rev-parse "origin/$LAST_RELEASE_BRANCH") echo "Last release commit: ${LAST_RELEASE_COMMIT}" if [ "$MAIN_COMMIT" = "$LAST_RELEASE_COMMIT" ]; then echo "Hash commit in main branch matches the last release branch commit" && exit 1; fi echo "COMMIT_NAME=$COMMIT_NAME" >> "$GITHUB_ENV" echo "LAST_RELEASE_VERSION=$LAST_RELEASE_VERSION" >> "$GITHUB_ENV" - # - name: Git user configuration - # run: | - # git config user.email "datalens-tech+bot@github.com" - # git config user.name "Datalens-tech robot" - # - name: Bump the version - # run: npm version patch -m 'bump version to %s' - # - name: Push changes - # run: git push - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From fb52bf88c33c50e75bf61ec1ef2c635a3911cc4d Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 17:33:34 +0300 Subject: [PATCH 10/34] CI fix 9 --- .github/workflows/bump-version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 3990c63..a30894e 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -35,7 +35,7 @@ jobs: LAST_RELEASE_COMMIT=$(git rev-parse "origin/$LAST_RELEASE_BRANCH") echo "Last release commit: ${LAST_RELEASE_COMMIT}" - if [ "$MAIN_COMMIT" = "$LAST_RELEASE_COMMIT" ]; then echo "Hash commit in main branch matches the last release branch commit" && exit 1; fi + echo "COMMIT_NAME=$COMMIT_NAME" >> "$GITHUB_ENV" echo "LAST_RELEASE_VERSION=$LAST_RELEASE_VERSION" >> "$GITHUB_ENV" From 10115d4ea5f90c82c752c381258ea3a48a38d768 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 17:35:19 +0300 Subject: [PATCH 11/34] CI fix 10 --- .github/workflows/bump-version.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index a30894e..b8b7b97 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -10,7 +10,6 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - # packages: write steps: - name: Checkout uses: actions/checkout@v4 @@ -36,6 +35,15 @@ jobs: echo "Last release commit: ${LAST_RELEASE_COMMIT}" - + echo "COMMIT_NAME=$COMMIT_NAME" >> "$GITHUB_ENV" echo "LAST_RELEASE_VERSION=$LAST_RELEASE_VERSION" >> "$GITHUB_ENV" + - name: 'Make new release version number' + run: | + npm version "$LAST_RELEASE_VERSION" --no-git-tag-version --allow-same-version + + TAG_NEW_VERSION=$(npm version minor --no-git-tag-version --allow-same-version) + NEW_VERSION=$(echo $TAG_NEW_VERSION | sed 's|v||') + + echo "NEW_VERSION=$NEW_VERSION" >> "$GITHUB_ENV" + echo "TAG_NEW_VERSION=$TAG_NEW_VERSION" >> "$GITHUB_ENV" From 3e931599f4810ac7d9e8b1e36f72d7a68ae3f08d Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 17:40:34 +0300 Subject: [PATCH 12/34] CI fix 1 --- .github/workflows/bump-version.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index b8b7b97..e33da36 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -47,3 +47,11 @@ jobs: echo "NEW_VERSION=$NEW_VERSION" >> "$GITHUB_ENV" echo "TAG_NEW_VERSION=$TAG_NEW_VERSION" >> "$GITHUB_ENV" + - name: 'Create new release branch' + run: | + NEW_BRANCH="release-$NEW_VERSION" + + git checkout -b "$NEW_BRANCH" + echo "Created new release branch: $NEW_BRANCH" + + echo "NEW_BRANCH=$NEW_BRANCH" >> "$GITHUB_ENV" From 3ecefb9b5748d2ebc55b615481a41d3f9dc25890 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 17:43:27 +0300 Subject: [PATCH 13/34] CI fix 12 --- .github/workflows/bump-version.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index e33da36..76d89d1 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -55,3 +55,20 @@ jobs: echo "Created new release branch: $NEW_BRANCH" echo "NEW_BRANCH=$NEW_BRANCH" >> "$GITHUB_ENV" + - name: 'Commit package version' + run: | + git config user.email "" && git config user.name "GitHub Release" + git add package.json && git add package-lock.json && git commit -am "Bump version to $NEW_VERSION [release]" + git push --set-upstream origin "$NEW_BRANCH" + - uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ env.TAG_NEW_VERSION }} + release_name: ${{ env.TAG_NEW_VERSION }} + commitish: ${{ env.NEW_BRANCH }} + body: ${{ env.COMMIT_NAME }} + draft: false + prerelease: false + - name: 'Success notify' + run: echo "Version bumped to '$TAG_NEW_VERSION' and pushed to remote repository" From e5419d2047fac40a0ba0e4863f74b00bdaf02b61 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 18:13:31 +0300 Subject: [PATCH 14/34] CI fix 13 --- .github/workflows/bump-version.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 76d89d1..1656fca 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -55,11 +55,11 @@ jobs: echo "Created new release branch: $NEW_BRANCH" echo "NEW_BRANCH=$NEW_BRANCH" >> "$GITHUB_ENV" - - name: 'Commit package version' - run: | - git config user.email "" && git config user.name "GitHub Release" - git add package.json && git add package-lock.json && git commit -am "Bump version to $NEW_VERSION [release]" - git push --set-upstream origin "$NEW_BRANCH" + - name: 'Commit package version' + run: | + git config user.email "" && git config user.name "GitHub Release" + git add package.json && git add package-lock.json && git commit -am "Bump version to $NEW_VERSION [release]" + git push --set-upstream origin "$NEW_BRANCH" - uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 5f667c16b9f94808434493c2f8cf37cdc588bf91 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 18:35:34 +0300 Subject: [PATCH 15/34] CI fix 14 --- .../{bump-version.yml => github-release.yml} | 16 ++++++++++++---- package.json | 3 --- 2 files changed, 12 insertions(+), 7 deletions(-) rename .github/workflows/{bump-version.yml => github-release.yml} (86%) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/github-release.yml similarity index 86% rename from .github/workflows/bump-version.yml rename to .github/workflows/github-release.yml index 1656fca..cff89b1 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/github-release.yml @@ -1,4 +1,4 @@ -name: Bump path version +name: Release on Github on: # push: @@ -6,7 +6,7 @@ on: pull_request: jobs: - bump-version: + github-release: runs-on: ubuntu-latest permissions: contents: write @@ -70,5 +70,13 @@ jobs: body: ${{ env.COMMIT_NAME }} draft: false prerelease: false - - name: 'Success notify' - run: echo "Version bumped to '$TAG_NEW_VERSION' and pushed to remote repository" + # - name: 'Success notify' + # run: echo "Version bumped to '$TAG_NEW_VERSION' and pushed to remote repository" + - name: Install Packages + run: npm ci + - name: Build + run: npm run build + - name: Publish + run: npm publish --tag "$TAG_NEW_VERSION" + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index 8b30588..679ca5b 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,5 @@ "npm": ">= 9", "yarn": "Please use npm instead of yarn to install dependencies", "pnpm": "Please use npm instead of pnpm to install dependencies" - }, - "publishConfig": { - "registry": "https://npm.pkg.github.com" } } From 628187322daeaddb0e16c8f1c41238a71173a1f5 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 18:49:53 +0300 Subject: [PATCH 16/34] CI fix 15 --- .github/workflows/github-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index cff89b1..122459f 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -77,6 +77,6 @@ jobs: - name: Build run: npm run build - name: Publish - run: npm publish --tag "$TAG_NEW_VERSION" + run: npm version "$TAG_NEW_VERSION" && npm publish env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 42a4b63369caa61fda2b534bb4086699eb33f6b3 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 18:54:46 +0300 Subject: [PATCH 17/34] CI fix 16 --- .github/workflows/github-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 122459f..8e0aad4 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -77,6 +77,6 @@ jobs: - name: Build run: npm run build - name: Publish - run: npm version "$TAG_NEW_VERSION" && npm publish + run: npm publish --tag "beta-$TAG_NEW_VERSION" env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ac232b51e909950bf2e3272e56a7e150075668aa Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 19:14:01 +0300 Subject: [PATCH 18/34] CI fix 17 --- .github/workflows/github-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 8e0aad4..9717e7b 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -79,4 +79,4 @@ jobs: - name: Publish run: npm publish --tag "beta-$TAG_NEW_VERSION" env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} From c91400a1d421e10cb5fae3b530386a1c221257ba Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 19:29:03 +0300 Subject: [PATCH 19/34] CI fix 18 --- .github/workflows/github-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 9717e7b..4b2b7ff 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -10,6 +10,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: write + packages: write steps: - name: Checkout uses: actions/checkout@v4 From 2244fa831848b94517b6a2e8ed067aa691e352cb Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 19:31:51 +0300 Subject: [PATCH 20/34] CI fix 19 --- .github/workflows/github-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 4b2b7ff..5195205 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - packages: write + id-token: write steps: - name: Checkout uses: actions/checkout@v4 From 278f4fc8f1e1adc509cfd72c9a66fab4fb0987c1 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 19:34:05 +0300 Subject: [PATCH 21/34] CI fix 20 --- .github/workflows/github-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 5195205..4d7cf74 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -78,6 +78,6 @@ jobs: - name: Build run: npm run build - name: Publish - run: npm publish --tag "beta-$TAG_NEW_VERSION" + run: npm publish --tag "beta-$TAG_NEW_VERSION" --access public --provenance env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} From ff15037a028c2914ec814b1c60a7cd1a1f265489 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Wed, 16 Oct 2024 19:53:49 +0300 Subject: [PATCH 22/34] CI fix 21 --- .github/workflows/github-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 4d7cf74..00b4c96 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -78,6 +78,6 @@ jobs: - name: Build run: npm run build - name: Publish - run: npm publish --tag "beta-$TAG_NEW_VERSION" --access public --provenance + run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} From 34c4c151d9e86968e6dacb36fcfbf49a38456c0b Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Fri, 18 Oct 2024 18:39:07 +0300 Subject: [PATCH 23/34] CI fix 22 --- .github/workflows/github-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 00b4c96..bcf77c8 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -1,4 +1,4 @@ -name: Release on Github +name: Release and publish on: # push: @@ -6,7 +6,7 @@ on: pull_request: jobs: - github-release: + release-publish: runs-on: ubuntu-latest permissions: contents: write @@ -78,6 +78,6 @@ jobs: - name: Build run: npm run build - name: Publish - run: npm publish + run: npm publish --tag "beta-$TAG_NEW_VERSION" env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} From f75c2ee616dfbfbd8f171af2e5c702279613747d Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Fri, 18 Oct 2024 18:47:01 +0300 Subject: [PATCH 24/34] CI fix 23 --- .github/workflows/github-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index bcf77c8..f6a3321 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - id-token: write + packages: write steps: - name: Checkout uses: actions/checkout@v4 From 7d6940c8fc6b65e2127abdc1d939957e0a60a2e0 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Fri, 18 Oct 2024 18:52:49 +0300 Subject: [PATCH 25/34] CI fix 24 --- .github/workflows/github-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index f6a3321..987fd05 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -22,6 +22,7 @@ jobs: with: node-version: 20 cache: npm + registry-url: 'https://registry.npmjs.org' - name: 'Get last release' run: | COMMIT_NAME=$(git log -n 1 --pretty=format:%s) From 95cb26557d074bb35ff6d768131afc1ef7f1b890 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Fri, 18 Oct 2024 18:55:07 +0300 Subject: [PATCH 26/34] CI fix 25 --- .github/workflows/github-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 987fd05..5787b6c 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -79,6 +79,6 @@ jobs: - name: Build run: npm run build - name: Publish - run: npm publish --tag "beta-$TAG_NEW_VERSION" + run: npm publish --access=public --tag "beta-$TAG_NEW_VERSION" env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} From f79990df71571c18910ed0cebe72f950104301a3 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Fri, 18 Oct 2024 19:26:55 +0300 Subject: [PATCH 27/34] CI fix 26 --- .github/workflows/github-release.yml | 2 -- package-lock.json | 4 ++-- package.json | 3 ++- src/index.js | 0 webpack.config.js | 1 + 5 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 src/index.js diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 5787b6c..7986c12 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -72,8 +72,6 @@ jobs: body: ${{ env.COMMIT_NAME }} draft: false prerelease: false - # - name: 'Success notify' - # run: echo "Version bumped to '$TAG_NEW_VERSION' and pushed to remote repository" - name: Install Packages run: npm ci - name: Build diff --git a/package-lock.json b/package-lock.json index 90fe4dd..6d4a660 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@datalens-tech/ui-sandbox-modules", - "version": "0.0.2", + "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@datalens-tech/ui-sandbox-modules", - "version": "0.0.2", + "version": "0.0.1", "devDependencies": { "@gravity-ui/date-utils.2.3.0": "npm:@gravity-ui/date-utils@^2.3.0", "@gravity-ui/date-utils.2.5.3": "npm:@gravity-ui/date-utils@^2.5.3", diff --git a/package.json b/package.json index 679ca5b..95092ee 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,10 @@ { "name": "@datalens-tech/ui-sandbox-modules", - "version": "0.0.2", + "version": "0.0.1", "description": "UI-sandbox modules", "repository": "https://github.com/datalens-tech/ui-sandbox-modules.git", "author": "DataLens Team ", + "main": "./dist/index.js", "scripts": { "build": "rm -rf dist && NODE_OPTIONS=--max_old_space_size=4096 webpack -c webpack.config.js", "prepublishOnly": "npm run build && npm pkg delete engines" diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..e69de29 diff --git a/webpack.config.js b/webpack.config.js index 2c4cb2e..358f3ab 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -2,6 +2,7 @@ const path = require('path'); module.exports = { entry: { + 'index': './src/index.js', '@gravity-ui/date-utils/v2.3.0': { import: '@gravity-ui/date-utils.2.3.0', }, From 4062b118a477644d2e508fb8e1cbc1cdc5a31553 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Fri, 18 Oct 2024 19:30:33 +0300 Subject: [PATCH 28/34] CI fix 27 --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 358f3ab..fb5030d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -2,7 +2,7 @@ const path = require('path'); module.exports = { entry: { - 'index': './src/index.js', + 'index': path.resolve(__dirname, 'src/index.js'), '@gravity-ui/date-utils/v2.3.0': { import: '@gravity-ui/date-utils.2.3.0', }, From 4d52e9894af5a99db3dcbeb71d082d65c7a4ee82 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Fri, 18 Oct 2024 19:50:10 +0300 Subject: [PATCH 29/34] CI fix 28 --- package.json | 10 +++------- webpack.config.js | 1 - 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 95092ee..d69763c 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ "description": "UI-sandbox modules", "repository": "https://github.com/datalens-tech/ui-sandbox-modules.git", "author": "DataLens Team ", - "main": "./dist/index.js", + "files": [ + "dist/" + ], "scripts": { "build": "rm -rf dist && NODE_OPTIONS=--max_old_space_size=4096 webpack -c webpack.config.js", "prepublishOnly": "npm run build && npm pkg delete engines" @@ -13,11 +15,5 @@ "@gravity-ui/date-utils.2.3.0": "npm:@gravity-ui/date-utils@^2.3.0", "@gravity-ui/date-utils.2.5.3": "npm:@gravity-ui/date-utils@^2.5.3", "webpack-cli": "^5.1.4" - }, - "engines": { - "node": ">= 18", - "npm": ">= 9", - "yarn": "Please use npm instead of yarn to install dependencies", - "pnpm": "Please use npm instead of pnpm to install dependencies" } } diff --git a/webpack.config.js b/webpack.config.js index fb5030d..2c4cb2e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -2,7 +2,6 @@ const path = require('path'); module.exports = { entry: { - 'index': path.resolve(__dirname, 'src/index.js'), '@gravity-ui/date-utils/v2.3.0': { import: '@gravity-ui/date-utils.2.3.0', }, From bc9e44306b3994e5f64b157475f921eecef4af6c Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Mon, 21 Oct 2024 14:30:09 +0300 Subject: [PATCH 30/34] CI fix 29 --- ...ub-release.yml => release-and-publish.yml} | 12 +++---- .github/workflows/release.yml | 35 ------------------- 2 files changed, 5 insertions(+), 42 deletions(-) rename .github/workflows/{github-release.yml => release-and-publish.yml} (93%) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/github-release.yml b/.github/workflows/release-and-publish.yml similarity index 93% rename from .github/workflows/github-release.yml rename to .github/workflows/release-and-publish.yml index 7986c12..528ae0c 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/release-and-publish.yml @@ -6,7 +6,7 @@ on: pull_request: jobs: - release-publish: + release-and-publish: runs-on: ubuntu-latest permissions: contents: write @@ -23,7 +23,7 @@ jobs: node-version: 20 cache: npm registry-url: 'https://registry.npmjs.org' - - name: 'Get last release' + - name: Get last release run: | COMMIT_NAME=$(git log -n 1 --pretty=format:%s) @@ -36,11 +36,9 @@ jobs: LAST_RELEASE_COMMIT=$(git rev-parse "origin/$LAST_RELEASE_BRANCH") echo "Last release commit: ${LAST_RELEASE_COMMIT}" - - echo "COMMIT_NAME=$COMMIT_NAME" >> "$GITHUB_ENV" echo "LAST_RELEASE_VERSION=$LAST_RELEASE_VERSION" >> "$GITHUB_ENV" - - name: 'Make new release version number' + - name: Make new release version number run: | npm version "$LAST_RELEASE_VERSION" --no-git-tag-version --allow-same-version @@ -49,7 +47,7 @@ jobs: echo "NEW_VERSION=$NEW_VERSION" >> "$GITHUB_ENV" echo "TAG_NEW_VERSION=$TAG_NEW_VERSION" >> "$GITHUB_ENV" - - name: 'Create new release branch' + - name: Create new release branch run: | NEW_BRANCH="release-$NEW_VERSION" @@ -57,7 +55,7 @@ jobs: echo "Created new release branch: $NEW_BRANCH" echo "NEW_BRANCH=$NEW_BRANCH" >> "$GITHUB_ENV" - - name: 'Commit package version' + - name: Commit package version run: | git config user.email "" && git config user.name "GitHub Release" git add package.json && git add package-lock.json && git commit -am "Bump version to $NEW_VERSION [release]" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 2db3b91..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Release - -on: - workflow_run: - workflows: ['Verify'] - types: - - completed - -jobs: - release: - name: Release - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - name: Checkout - uses: actions/checkout@v4 - # - name: Setup Node - # uses: actions/setup-node@v4 - # with: - # node-version: 20 - # registry-url: 'https://npm.pkg.github.com' - # scope: '@datalens-tech' - # cache: npm - # - name: Install Packages - # run: npm ci - # - name: Build - # run: npm run build - # - name: Git user configuration - # run: git config user.email "datalens-tech+bot@github.com" && git config user.name "Datalens-tech robot" - # - name: Publish - # run: npm version patch && npm publish - # env: - # NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 456eee91dfbfe7800abf2cc6fc820b6c6960dfaf Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Mon, 21 Oct 2024 14:33:53 +0300 Subject: [PATCH 31/34] CI fix 30 --- .github/workflows/release-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release-and-publish.yml index 528ae0c..0cca146 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release-and-publish.yml @@ -75,6 +75,6 @@ jobs: - name: Build run: npm run build - name: Publish - run: npm publish --access=public --tag "beta-$TAG_NEW_VERSION" + run: npm publish --access=public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} From 3d6daef558147203b440a338a7d07188854a1f98 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Mon, 21 Oct 2024 15:24:49 +0300 Subject: [PATCH 32/34] CI fix 31 --- .github/workflows/release-and-publish.yml | 5 ++--- .github/workflows/verify.yml | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release-and-publish.yml index 0cca146..0e0f31c 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release-and-publish.yml @@ -1,9 +1,8 @@ name: Release and publish on: - # push: - # branches: [main] - pull_request: + push: + branches: [main] jobs: release-and-publish: diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index ab77fef..1e008bb 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -1,8 +1,6 @@ name: Verify on: - push: - branches: [main] pull_request: jobs: From 7d25d76a8c4b5f0843bfc66ac4d778c0861a6580 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Mon, 21 Oct 2024 15:27:17 +0300 Subject: [PATCH 33/34] CI fix 32 --- package.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package.json b/package.json index d69763c..80c0ee7 100644 --- a/package.json +++ b/package.json @@ -15,5 +15,11 @@ "@gravity-ui/date-utils.2.3.0": "npm:@gravity-ui/date-utils@^2.3.0", "@gravity-ui/date-utils.2.5.3": "npm:@gravity-ui/date-utils@^2.5.3", "webpack-cli": "^5.1.4" + }, + "engines": { + "node": ">= 18", + "npm": ">= 9", + "yarn": "Please use npm instead of yarn to install dependencies", + "pnpm": "Please use npm instead of pnpm to install dependencies" } } From 1a6d867590fb34a2c64604d3d0bf3a9716e4d8f3 Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Mon, 21 Oct 2024 15:31:22 +0300 Subject: [PATCH 34/34] CI fix 33 --- src/index.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/index.js diff --git a/src/index.js b/src/index.js deleted file mode 100644 index e69de29..0000000