From 74497f07a362a209bb2b8bee23fa63bf31b52222 Mon Sep 17 00:00:00 2001 From: joolim <76763957+joolim@users.noreply.github.com> Date: Wed, 30 Jun 2021 13:56:07 +0800 Subject: [PATCH 1/5] Create node.js.yml --- .github/workflows/node.js.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..c73c974 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,30 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI with React Router + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 14.x, 16.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build --if-present + - run: npm test From 568c611ad83f155ebc973eac6f21264cacc4958c Mon Sep 17 00:00:00 2001 From: joolim Date: Wed, 30 Jun 2021 15:42:32 +0800 Subject: [PATCH 2/5] undated readme.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 02aac3f..cc1ad7b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +# Forked, and to Commit in Github, create container in Docker. + # Getting Started with Create React App This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). From 6f4d2acb885e12a5f4d018981e7df173d290b47f Mon Sep 17 00:00:00 2001 From: joolim <76763957+joolim@users.noreply.github.com> Date: Wed, 30 Jun 2021 16:09:45 +0800 Subject: [PATCH 3/5] Update node.js.yml npm start --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c73c974..43fb331 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -28,3 +28,4 @@ jobs: - run: npm ci - run: npm run build --if-present - run: npm test + - run: npm start From 370646c65cf0b3b8403a053bad2e7c4dde1bf596 Mon Sep 17 00:00:00 2001 From: joolim <76763957+joolim@users.noreply.github.com> Date: Wed, 30 Jun 2021 16:12:17 +0800 Subject: [PATCH 4/5] Update node.js.yml delete npm start --- .github/workflows/node.js.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 43fb331..c73c974 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -28,4 +28,3 @@ jobs: - run: npm ci - run: npm run build --if-present - run: npm test - - run: npm start From ecaa92cca58254bc0d588f835858fcbfe7152a93 Mon Sep 17 00:00:00 2001 From: joolim <76763957+joolim@users.noreply.github.com> Date: Wed, 30 Jun 2021 16:14:51 +0800 Subject: [PATCH 5/5] Create npm-publish.yml commit and publish --- .github/workflows/npm-publish.yml | 50 +++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..fd061ae --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,50 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + - run: npm ci + - run: npm test + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} + + publish-gpr: + needs: build + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + registry-url: https://npm.pkg.github.com/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}