From e55a09fa52778a054ccc0092deaeb330fa055126 Mon Sep 17 00:00:00 2001 From: siva Date: Tue, 30 Sep 2025 11:29:19 +0530 Subject: [PATCH 1/5] Create master.yaml --- .github/workflows/master.yaml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/master.yaml diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml new file mode 100644 index 0000000000..847e021bfd --- /dev/null +++ b/.github/workflows/master.yaml @@ -0,0 +1,48 @@ +name: workflow for Master +on: + push: + branches: + # - "master" + - "setup-workflows" +jobs: + build: + runs-on: ubicloud-standard-2 + permissions: + contents: read + id-token: write + packages: write + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Setup Node.js + uses: actions/setup-node@v5 + with: + node-version: '20' + + - id: 'auth-spotdraft-qa' + name: 'Authenticate to Google Cloud' + uses: 'google-github-actions/auth@v1.1.1' + with: + token_format: 'access_token' + workload_identity_provider: 'projects/400887723303/locations/global/workloadIdentityPools/github-actions-pool/providers/github-provider' + service_account: 'github-actions@spotdraft-qa.iam.gserviceaccount.com' + + - name: Set up gcloud CLI + uses: google-github-actions/setup-gcloud@v3 + with: + project_id: 'spotdraft-qa' + + - name: Configure NPM to use Artifact Registry + run: | + TOKEN=$(gcloud auth print-access-token) + rm -rf .npmrc + echo "//asia-south1-npm.pkg.dev/spotdraft-qa/npm/:_authToken=\"$TOKEN\"" >> .npmrc + echo "@spotdraft:registry=https://asia-south1-npm.pkg.dev/spotdraft-qa/npm/" >> .npmrc + + - name: Install dependencies + run: npm install + + - name: Publish package + run: | + npm publish \ No newline at end of file From 0777014c5a5c1b09e51ff91852c43d3c64e97cdd Mon Sep 17 00:00:00 2001 From: siva Date: Tue, 30 Sep 2025 11:31:05 +0530 Subject: [PATCH 2/5] Update master.yaml --- .github/workflows/master.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml index 847e021bfd..1c1c5bf60f 100644 --- a/.github/workflows/master.yaml +++ b/.github/workflows/master.yaml @@ -37,7 +37,7 @@ jobs: run: | TOKEN=$(gcloud auth print-access-token) rm -rf .npmrc - echo "//asia-south1-npm.pkg.dev/spotdraft-qa/npm/:_authToken=\"$TOKEN\"" >> .npmrc + echo -e "\n//asia-south1-npm.pkg.dev/spotdraft-qa/npm/:_authToken=\"$TOKEN\"" >> .npmrc echo "@spotdraft:registry=https://asia-south1-npm.pkg.dev/spotdraft-qa/npm/" >> .npmrc - name: Install dependencies From 27f0cf8534d32ab0b5385eb9a2ca1bb2dcf9bc4c Mon Sep 17 00:00:00 2001 From: siva Date: Tue, 30 Sep 2025 11:35:25 +0530 Subject: [PATCH 3/5] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2cffc26250..1d2564a0dd 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "liquidjs", + "name": "@spotdraft/liquidjs", "version": "3.1.0", "description": "Liquid template engine by pure JavaScript: compatible to shopify, easy to extend.", "main": "index.js", From f03ecfbbff29fbcb612268c1cc98d04cf7175e7c Mon Sep 17 00:00:00 2001 From: siva Date: Tue, 30 Sep 2025 11:58:51 +0530 Subject: [PATCH 4/5] Update master.yaml --- .github/workflows/master.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml index 1c1c5bf60f..3f99ece65c 100644 --- a/.github/workflows/master.yaml +++ b/.github/workflows/master.yaml @@ -2,8 +2,7 @@ name: workflow for Master on: push: branches: - # - "master" - - "setup-workflows" + - "master" jobs: build: runs-on: ubicloud-standard-2 From ec251965e63575564288bc74f7942b4c91b942c5 Mon Sep 17 00:00:00 2001 From: siva Date: Fri, 3 Oct 2025 13:12:58 +0530 Subject: [PATCH 5/5] Create pr.yaml --- .github/workflows/pr.yaml | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/pr.yaml diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 0000000000..a89633e87a --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,47 @@ +name: workflow for PR +on: + pull_request: + types: [opened, synchronize, reopened] + branches: [master] +jobs: + build: + runs-on: ubicloud-standard-2 + permissions: + contents: read + id-token: write + packages: write + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Setup Node.js + uses: actions/setup-node@v5 + with: + node-version: '24' + + - id: 'auth-spotdraft-qa' + name: 'Authenticate to Google Cloud' + uses: 'google-github-actions/auth@v1.1.1' + with: + token_format: 'access_token' + workload_identity_provider: 'projects/400887723303/locations/global/workloadIdentityPools/github-actions-pool/providers/github-provider' + service_account: 'github-actions@spotdraft-qa.iam.gserviceaccount.com' + + - name: Set up gcloud CLI + uses: google-github-actions/setup-gcloud@v3 + with: + project_id: 'spotdraft-qa' + + - name: Configure NPM to use Artifact Registry + run: | + TOKEN=$(gcloud auth print-access-token) + rm -rf .npmrc + echo -e "\n//asia-south1-npm.pkg.dev/spotdraft-qa/npm/:_authToken=\"$TOKEN\"" >> .npmrc + echo "@spotdraft:registry=https://asia-south1-npm.pkg.dev/spotdraft-qa/npm/" >> .npmrc + + - name: Install dependencies + run: npm install + + - name: Publish package + run: | + npm publish --dry-run \ No newline at end of file