From e15a4952ae37adbeec4cff05fafc3136aed24636 Mon Sep 17 00:00:00 2001 From: Max Litruv Boonzaayer Date: Mon, 12 Jun 2023 02:03:43 +1000 Subject: [PATCH 1/3] Update npm-publish.yml --- .github/workflows/npm-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 2521185..d755949 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -26,4 +26,4 @@ jobs: registry-url: https://registry.npmjs.org/ - run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} From 4448ca0615374c2b80942efc5b1aaecbde9e3808 Mon Sep 17 00:00:00 2001 From: Max Litruv Boonzaayer Date: Mon, 12 Jun 2023 02:09:42 +1000 Subject: [PATCH 2/3] Update npm-publish.yml --- .github/workflows/npm-publish.yml | 37 ++++++++++++++----------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index d755949..8043164 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,29 +1,26 @@ -# 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://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages - -name: Node.js Package +name: NPM Publish on: - release: - types: [created] + push: + branches: + - main jobs: - build: + publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 with: node-version: 18 - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - registry-url: https://registry.npmjs.org/ - - run: npm publish + + - name: Install dependencies + run: npm ci + + - name: Publish to NPM + run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From ac68b12a008c36bed79bcd3d2ba7222c526addb8 Mon Sep 17 00:00:00 2001 From: Max Litruv Boonzaayer Date: Mon, 12 Jun 2023 02:21:44 +1000 Subject: [PATCH 3/3] Create versionIncrement.yml --- .github/workflows/versionIncrement.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/versionIncrement.yml diff --git a/.github/workflows/versionIncrement.yml b/.github/workflows/versionIncrement.yml new file mode 100644 index 0000000..311ddd3 --- /dev/null +++ b/.github/workflows/versionIncrement.yml @@ -0,0 +1,19 @@ +name: Version Increment + +on: + push: + branches: + - main + +jobs: + version: + runs-on: ubuntu-latest + if: "!startsWith(github.event.head_commit.message, '[RELEASE]')" + steps: + - uses: actions/checkout@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - run: git config --global user.name 'Litruv' + - run: git config --global user.email 'litruv@gmail.com' + - run: npm version patch -m "[RELEASE] %s" + - run: git push