From 5b93ed74af8cf605deb8f5d9619b257736258358 Mon Sep 17 00:00:00 2001 From: tiavina-mika Date: Mon, 29 Apr 2024 10:22:42 +0300 Subject: [PATCH 1/5] v0.1.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b14f044..8ef3dce 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "email": "tiavinamika@gmail.com", "github": "https://github.com/tiavina-mika" }, - "version": "0.1.36", + "version": "0.1.4", "license": "MIT", "type": "module", "types": "./dist/index.d.ts", From 9b84cd62d8da2e025ac99b5758fd1d6d6bc26cf6 Mon Sep 17 00:00:00 2001 From: tiavina-mika Date: Mon, 29 Apr 2024 10:27:30 +0300 Subject: [PATCH 2/5] test workflow --- .github/workflows/github-actions-demo.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/github-actions-demo.yml diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml new file mode 100644 index 0000000..0eb7126 --- /dev/null +++ b/.github/workflows/github-actions-demo.yml @@ -0,0 +1,18 @@ +name: GitHub Actions Demo +run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 +on: [push] +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." From e6515ca14ba05f45b3c7825410ad859101aa3616 Mon Sep 17 00:00:00 2001 From: tiavina-mika Date: Mon, 29 Apr 2024 11:00:01 +0300 Subject: [PATCH 3/5] Create release.yml --- .github/workflows/release.yml | 81 +++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b8d143d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,81 @@ +name: Publish Package to npmjs +run-name: ${{ github.actor }} publish to npm 🚀 + +on: + push: + tags: + - "v*.*.*" +jobs: + # Then release to npm + build: + name: Lint and build + runs-on: ubuntu-latest + + needs: [build-test] # Require standard CI steps to pass before publishing + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + # Set up .npmrc file to publish to npm. This also allows NODE_AUTH_TOKEN + # to work below. + - name: Install Nodejs + uses: actions/setup-node@v4 + with: + node-version: "18.x" + registry-url: "https://registry.npmjs.org" + + - name: Setup Yarn in Node + uses: actions/setup-node@v4 + with: + cache: "yarn" # uses the system node, which was updated prior. + + - name: Install dependencies + run: yarn + + - name: Lint and clean code + run: yarn lint + + - name: Build + run: yarn build + + # Then release to npm + release: + if: ${{ github.ref == 'refs/heads/main' }} + name: Publish + runs-on: ubuntu-latest + + permissions: + contents: read + id-token: write # Needed for https://docs.npmjs.com/generating-provenance-statements + strategy: + matrix: + node-version: [18] + + + needs: [build] # Require standard CI steps to pass before publishing + + steps: + - name: Checkout repo + run: echo "${{ github.event_name }} on ${{ github.ref }}." + + - name: Checkout repo + uses: actions/checkout@v4 + + # Set up .npmrc file to publish to npm. This also allows NODE_AUTH_TOKEN + # to work below. + - name: Install Nodejs + uses: actions/setup-node@v4 + with: + node-version: "18.x" + registry-url: "https://registry.npmjs.org" + + - name: Setup Yarn in Node + uses: actions/setup-node@v4 + with: + cache: "yarn" # uses the system node, which was updated prior. + + - run: yarn publish --provenance + uses: ./ + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From 68dffc04e501f95bcafa372a071144640e012c1e Mon Sep 17 00:00:00 2001 From: tiavina-mika Date: Mon, 29 Apr 2024 11:02:03 +0300 Subject: [PATCH 4/5] Update release.yml --- .github/workflows/release.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b8d143d..0f8e1dc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,9 +56,6 @@ jobs: needs: [build] # Require standard CI steps to pass before publishing steps: - - name: Checkout repo - run: echo "${{ github.event_name }} on ${{ github.ref }}." - - name: Checkout repo uses: actions/checkout@v4 From a9e1837bce64e00a4c50490583030b5cb3f8acb9 Mon Sep 17 00:00:00 2001 From: tiavina-mika Date: Mon, 29 Apr 2024 11:24:04 +0300 Subject: [PATCH 5/5] Update release.yml --- .github/workflows/release.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0f8e1dc..68baac4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: name: Lint and build runs-on: ubuntu-latest - needs: [build-test] # Require standard CI steps to pass before publishing + # needs: [build-test] # Require standard CI steps to pass before publishing steps: - name: Checkout repo @@ -56,6 +56,9 @@ jobs: needs: [build] # Require standard CI steps to pass before publishing steps: + # - name: Checkout repo + # run: echo "${{ github.event_name }} on ${{ github.ref }}." + - name: Checkout repo uses: actions/checkout@v4 @@ -67,12 +70,13 @@ jobs: node-version: "18.x" registry-url: "https://registry.npmjs.org" - - name: Setup Yarn in Node - uses: actions/setup-node@v4 - with: - cache: "yarn" # uses the system node, which was updated prior. + # - name: Setup Yarn in Node + # uses: actions/setup-node@v4 + # with: + # cache: "yarn" # uses the system node, which was updated prior. - - run: yarn publish --provenance + - name: yarn publish --provenance + # - run: yarn publish --provenance uses: ./ env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}