From 9ef5cd46f4e0413a3209154cfd02cb057cbf156c Mon Sep 17 00:00:00 2001 From: Bimochan Shrestha Date: Wed, 17 May 2023 10:29:59 +0545 Subject: [PATCH 01/14] travis-to-act: Convert travis file to actions --- .github/workflows/master.yml | 85 ++++++++++++++++++++++++++++++++++++ .travis.yml | 56 ------------------------ 2 files changed, 85 insertions(+), 56 deletions(-) create mode 100644 .github/workflows/master.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml new file mode 100644 index 00000000..d8fee52e --- /dev/null +++ b/.github/workflows/master.yml @@ -0,0 +1,85 @@ +name: Build and Release from Master + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [node, 18, 16] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + + - name: Install hub + run: | + sudo apt update + sudo apt install hub + hub --version + + - name: Install github-changelog-generator + run: gem install github_changelog_generator + + - name: Install dependencies + run: yarn + + - name: Set Ribby as git user + run: | + git config user.name "Ribby" + git config user.email "bot@lftechnology.com" + + - name: Check format + run: yarn format:check + + - name: Lint code + run: yarn lint + + - name: Build project + run: yarn build + + - name: Test coverage + run: yarn test:coverage + + - name: Upload coverage to Codecov + run: yarn codecov + + - name: Determine branch + id: branch + run: echo "::set-output name=branch::$(if [ ${{ github.event_name }} == 'pull_request' ]; then echo ${{ github.event.pull_request.head.ref }}; else echo ${{ github.ref }}; fi)" + + deploy: + needs: build + if: github.ref == 'refs/heads/master' && github.event_name == 'push' + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: node + + - name: Run release script + run: ../release.sh compare_and_release + + - name: Deploy to NPM + run: | + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc + npm publish diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 51691770..00000000 --- a/.travis.yml +++ /dev/null @@ -1,56 +0,0 @@ -language: node_js - -dist: jammy - -branches: - only: - - master - -node_js: - - node - - 18 - - 16 - -git: - depth: false - -install: - # Install hub - - sudo apt update - - sudo apt install hub - - hub --version - - # Install github-changelog-generator - - gem install github_changelog_generator - - # Install dependencies - - yarn - -before_script: - # Set Ribby as git user - - git config user.name "Ribby" - - git config user.email "bot@lftechnology.com" - - - yarn format:check - - yarn lint - - yarn build - -script: - - yarn test:coverage - - yarn codecov - - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo "$TRAVIS_BRANCH"; else echo "$TRAVIS_PULL_REQUEST_BRANCH"; fi) - -jobs: - include: - - stage: deploy - if: branch = master - node_js: node - before_deploy: - - if [ "$BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./release.sh compare_and_release; fi - deploy: - provider: npm - email: '$NPM_EMAIL' - api_key: '$NPM_TOKEN' - skip_cleanup: true - on: - branch: master From f63717be0712a56c30394f0318375ddebfa6ea30 Mon Sep 17 00:00:00 2001 From: Bimochan Shrestha Date: Wed, 17 May 2023 10:34:37 +0545 Subject: [PATCH 02/14] travis-to-act: Fix path for release.sh --- .github/workflows/master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index d8fee52e..c6aaf58d 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -77,7 +77,7 @@ jobs: node-version: node - name: Run release script - run: ../release.sh compare_and_release + run: ../../release.sh compare_and_release - name: Deploy to NPM run: | From 13d6882aab81d39ce5ca698f16b308493e36f965 Mon Sep 17 00:00:00 2001 From: Bimochan Shrestha Date: Wed, 17 May 2023 10:53:30 +0545 Subject: [PATCH 03/14] travis-to-act: Setup node matrices --- .github/workflows/master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index c6aaf58d..13328d7f 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - node-version: [node, 18, 16] + node-version: [16, 18] steps: - name: Checkout code From 50943600386ec60b96992f4c9c1707cb45c3e112 Mon Sep 17 00:00:00 2001 From: Bimochan Shrestha Date: Wed, 17 May 2023 10:56:52 +0545 Subject: [PATCH 04/14] travis-to-act: Use v3 and cache npm --- .github/workflows/master.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 13328d7f..a9194f5c 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -18,12 +18,13 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + cache: 'npm' - name: Install hub run: | @@ -69,12 +70,13 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: node + cache: 'npm' - name: Run release script run: ../../release.sh compare_and_release From 50201731fc86ee5116dad528ae417b7975cf2654 Mon Sep 17 00:00:00 2001 From: Bimochan Shrestha Date: Wed, 17 May 2023 11:00:02 +0545 Subject: [PATCH 05/14] travis-to-act: Fix file permission issue while installing gem --- .github/workflows/master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index a9194f5c..ec4f8660 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -33,7 +33,7 @@ jobs: hub --version - name: Install github-changelog-generator - run: gem install github_changelog_generator + run: gem install github_changelog_generator --user-install - name: Install dependencies run: yarn From d3ecab9ad826b46aebba375401987855deb5d2ad Mon Sep 17 00:00:00 2001 From: Bimochan Shrestha Date: Wed, 17 May 2023 11:27:29 +0545 Subject: [PATCH 06/14] travis-to-act: Update codecov to 3.8.3 to handle the error --- package.json | 2 +- yarn.lock | 109 +++++++++++++++++++++++++++++---------------------- 2 files changed, 64 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index 89d66a38..d813db6d 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "@types/yamljs": "^0.2.30", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", - "codecov": "^3.5.0", + "codecov": "^3.8.3", "execa": "^4.0.0", "get-bin-path": "^5.0.1", "mocha": "^10.2.0", diff --git a/yarn.lock b/yarn.lock index 4528fbd0..af67d547 100644 --- a/yarn.lock +++ b/yarn.lock @@ -499,11 +499,6 @@ resolved "https://registry.yarnpkg.com/@types/yamljs/-/yamljs-0.2.30.tgz#d034e1d329e46e8d0f737c9a8db97f68f81b5382" integrity sha1-0DTh0ynkbo0Pc3yajbl/aPgbU4I= -agent-base@5: - version "5.1.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c" - integrity sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g== - agent-base@6: version "6.0.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.0.tgz#5d0101f19bbfaed39980b22ae866de153b93f09a" @@ -871,16 +866,16 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" -codecov@^3.5.0: - version "3.7.1" - resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.7.1.tgz#434cb8d55f18ef01672e5739d3d266696bebc202" - integrity sha512-JHWxyPTkMLLJn9SmKJnwAnvY09kg2Os2+Ux+GG7LwZ9g8gzDDISpIN5wAsH1UBaafA/yGcd3KofMaorE8qd6Lw== +codecov@^3.8.3: + version "3.8.3" + resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.8.3.tgz#9c3e364b8a700c597346ae98418d09880a3fdbe7" + integrity sha512-Y8Hw+V3HgR7V71xWH2vQ9lyS358CbGCldWlJFR0JirqoGtOoas3R3/OclRTvgUYFK29mmJICDPauVKmpqbwhOA== dependencies: argv "0.0.2" - ignore-walk "3.0.3" - js-yaml "3.13.1" - teeny-request "6.0.1" - urlgrey "0.4.4" + ignore-walk "3.0.4" + js-yaml "3.14.1" + teeny-request "7.1.1" + urlgrey "1.0.0" color-convert@^1.9.0: version "1.9.3" @@ -1179,6 +1174,13 @@ fast-glob@^3.1.1: micromatch "^4.0.2" picomatch "^2.2.1" +fast-url-parser@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d" + integrity sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ== + dependencies: + punycode "^1.3.2" + fastq@^1.6.0: version "1.6.1" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.6.1.tgz#4570c74f2ded173e71cf0beb08ac70bb85826791" @@ -1501,12 +1503,12 @@ http-proxy-agent@^4.0.0: agent-base "6" debug "4" -https-proxy-agent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b" - integrity sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg== +https-proxy-agent@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== dependencies: - agent-base "5" + agent-base "6" debug "4" human-signals@^1.1.1: @@ -1524,10 +1526,10 @@ ieee754@^1.1.13: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -ignore-walk@3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" - integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== +ignore-walk@3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.4.tgz#c9a09f69b7c7b479a5d74ac1a3c0d4236d2a6335" + integrity sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ== dependencies: minimatch "^3.0.4" @@ -1751,10 +1753,10 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@3.13.1, js-yaml@^3.13.1: - version "3.13.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" - integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== +js-yaml@3.14.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -1766,6 +1768,14 @@ js-yaml@4.1.0: dependencies: argparse "^2.0.1" +js-yaml@^3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -2005,10 +2015,10 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -node-fetch@^2.2.0: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== +node-fetch@^2.6.1: + version "2.6.11" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.11.tgz#cde7fc71deef3131ef80a738919f999e6edfff25" + integrity sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w== dependencies: whatwg-url "^5.0.0" @@ -2264,6 +2274,11 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" +punycode@^1.3.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== + qqjs@^0.3.10: version "0.3.11" resolved "https://registry.yarnpkg.com/qqjs/-/qqjs-0.3.11.tgz#795b9f7d00807d75c391b1241b5be3077143d9ea" @@ -2722,16 +2737,16 @@ tarn@^3.0.2: resolved "https://registry.yarnpkg.com/tarn/-/tarn-3.0.2.tgz#73b6140fbb881b71559c4f8bfde3d9a4b3d27693" integrity sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ== -teeny-request@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/teeny-request/-/teeny-request-6.0.1.tgz#9b1f512cef152945827ba7e34f62523a4ce2c5b0" - integrity sha512-TAK0c9a00ELOqLrZ49cFxvPVogMUFaWY8dUsQc/0CuQPGF+BOxOQzXfE413BAk2kLomwNplvdtMpeaeGWmoc2g== +teeny-request@7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/teeny-request/-/teeny-request-7.1.1.tgz#2b0d156f4a8ad81de44303302ba8d7f1f05e20e6" + integrity sha512-iwY6rkW5DDGq8hE2YgNQlKbptYpY5Nn2xecjQiNjOXWbKzPGUfmeUBCSQbbr306d7Z7U2N0TPl+/SwYRfua1Dg== dependencies: http-proxy-agent "^4.0.0" - https-proxy-agent "^4.0.0" - node-fetch "^2.2.0" + https-proxy-agent "^5.0.0" + node-fetch "^2.6.1" stream-events "^1.0.5" - uuid "^3.3.2" + uuid "^8.0.0" test-exclude@^6.0.0: version "6.0.0" @@ -2947,26 +2962,28 @@ universalify@^0.1.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== -urlgrey@0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-0.4.4.tgz#892fe95960805e85519f1cd4389f2cb4cbb7652f" - integrity sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8= +urlgrey@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-1.0.0.tgz#72d2f904482d0b602e3c7fa599343d699bbe1017" + integrity sha512-hJfIzMPJmI9IlLkby8QrsCykQ+SXDeO2W5Q9QTW3QpqZVTx4a/K7p8/5q+/isD8vsbVaFgql/gvAoQCRQ2Cb5w== + dependencies: + fast-url-parser "^1.1.3" util-deprecate@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -uuid@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== - uuid@^3.3.3: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +uuid@^8.0.0: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" From 4f6eb373d6957154d7ca5fb77d9f4b08808164fa Mon Sep 17 00:00:00 2001 From: Bimochan Shrestha Date: Thu, 8 Jun 2023 12:07:47 +0545 Subject: [PATCH 07/14] travis-to-act: Remove branch name logic, add node 20, change name of step --- .github/workflows/master.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index ec4f8660..b8b2664d 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -1,4 +1,4 @@ -name: Build and Release from Master +name: Build and Publish on: push: @@ -14,7 +14,7 @@ jobs: strategy: matrix: - node-version: [16, 18] + node-version: [16, 18, 20] steps: - name: Checkout code @@ -24,7 +24,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - cache: 'npm' + cache: 'yarn' - name: Install hub run: | @@ -58,11 +58,8 @@ jobs: - name: Upload coverage to Codecov run: yarn codecov - - name: Determine branch - id: branch - run: echo "::set-output name=branch::$(if [ ${{ github.event_name }} == 'pull_request' ]; then echo ${{ github.event.pull_request.head.ref }}; else echo ${{ github.ref }}; fi)" - - deploy: + publish: + name: Publish this as a package needs: build if: github.ref == 'refs/heads/master' && github.event_name == 'push' From 11c076e02c76517e8300b7a761f23637c2c3c5fe Mon Sep 17 00:00:00 2001 From: Bimochan Shrestha Date: Thu, 8 Jun 2023 12:07:55 +0545 Subject: [PATCH 08/14] travis-to-act: Remove git config --- release.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/release.sh b/release.sh index b8bc01f2..a22030b7 100755 --- a/release.sh +++ b/release.sh @@ -68,9 +68,6 @@ compare_and_release() { # Update commands and usage of CLI in README.md yarn doc:update - git config --global user.email "travis@travis-ci.org" - git config --global user.name "Travis CI" - git checkout master git add CHANGELOG.md README.md git commit -v -m "${NEXT} Release :tada: :fireworks: :bell:" -m "[skip ci]" From 5459c6dbb84f242f881d05b98786de1787bda9cb Mon Sep 17 00:00:00 2001 From: Bimochan Shrestha Date: Thu, 8 Jun 2023 12:08:34 +0545 Subject: [PATCH 09/14] travis-to-act: Rename file from master to build-publish --- .github/workflows/{master.yml => build-publish.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{master.yml => build-publish.yml} (100%) diff --git a/.github/workflows/master.yml b/.github/workflows/build-publish.yml similarity index 100% rename from .github/workflows/master.yml rename to .github/workflows/build-publish.yml From 19aa9e9f805d6b7e2250896c27439900ccea84f0 Mon Sep 17 00:00:00 2001 From: Bimochan Shrestha Date: Thu, 8 Jun 2023 12:14:29 +0545 Subject: [PATCH 10/14] travis-to-act: Rename env var name --- release.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release.sh b/release.sh index a22030b7..a3190567 100755 --- a/release.sh +++ b/release.sh @@ -20,7 +20,7 @@ changelog() { github_changelog_generator \ --user="leapfrogtechnology" \ --project="sync-db" \ - --token="$GITHUB_TOKEN" \ + --token="$RIBBY_GITHUB_TOKEN" \ --no-verbose \ --pr-label "**Changes**" \ --bugs-label "**Bug Fixes**" \ @@ -73,7 +73,7 @@ compare_and_release() { git commit -v -m "${NEXT} Release :tada: :fireworks: :bell:" -m "[skip ci]" # Add new remote with access token in the git URL for authentication - git remote add lft https://leapfrogtechnology:${GITHUB_TOKEN}@github.com/leapfrogtechnology/sync-db.git + git remote add lft https://leapfrogtechnology:${RIBBY_GITHUB_TOKEN}@github.com/leapfrogtechnology/sync-db.git git push lft master printfln "Changelog updated." From 870c1d3dbb4f38617063f4d5256844c653ee6146 Mon Sep 17 00:00:00 2001 From: Bimochan Shrestha Date: Thu, 8 Jun 2023 12:14:51 +0545 Subject: [PATCH 11/14] travis-to-act: Cache yarn and fix path --- .github/workflows/build-publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml index b8b2664d..11162ce6 100644 --- a/.github/workflows/build-publish.yml +++ b/.github/workflows/build-publish.yml @@ -73,12 +73,12 @@ jobs: uses: actions/setup-node@v3 with: node-version: node - cache: 'npm' + cache: 'yarn' - name: Run release script - run: ../../release.sh compare_and_release + run: ./release.sh compare_and_release - name: Deploy to NPM run: | echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc - npm publish + yarn publish From 04f4f26ad46b4aac28d8238b8d3c15c8c9f553e0 Mon Sep 17 00:00:00 2001 From: Bimochan Shrestha Date: Thu, 8 Jun 2023 12:44:17 +0545 Subject: [PATCH 12/14] travis-to-act: Install rubygems --- .github/workflows/build-publish.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml index 11162ce6..dadfb6f4 100644 --- a/.github/workflows/build-publish.yml +++ b/.github/workflows/build-publish.yml @@ -32,6 +32,11 @@ jobs: sudo apt install hub hub --version + - name: Install RubyGems + run: | + sudo apt install -y ruby-full + gem --version + - name: Install github-changelog-generator run: gem install github_changelog_generator --user-install From 069b16d59f73fe9d648286d0dd31e36bd4c99c53 Mon Sep 17 00:00:00 2001 From: Bimochan Shrestha Date: Fri, 9 Jun 2023 15:01:53 +0545 Subject: [PATCH 13/14] Rename install github changelog generator Co-authored-by: Saugat Acharya --- .github/workflows/build-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml index dadfb6f4..61111b84 100644 --- a/.github/workflows/build-publish.yml +++ b/.github/workflows/build-publish.yml @@ -37,7 +37,7 @@ jobs: sudo apt install -y ruby-full gem --version - - name: Install github-changelog-generator + - name: Install GitHub changelog generator run: gem install github_changelog_generator --user-install - name: Install dependencies From c88495f7c79b308446805b304a54fcadf3480a7f Mon Sep 17 00:00:00 2001 From: Bimochan Shrestha Date: Fri, 9 Jun 2023 15:02:09 +0545 Subject: [PATCH 14/14] Rename publish step Co-authored-by: Saugat Acharya --- .github/workflows/build-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml index 61111b84..c971ebaa 100644 --- a/.github/workflows/build-publish.yml +++ b/.github/workflows/build-publish.yml @@ -64,7 +64,7 @@ jobs: run: yarn codecov publish: - name: Publish this as a package + name: Publish @leapfrogtechnology/sync-db package needs: build if: github.ref == 'refs/heads/master' && github.event_name == 'push'