From dd1fca7691e5d44e7889a5ebabf946b8ac6e314a Mon Sep 17 00:00:00 2001 From: thislight Date: Sun, 14 Jul 2024 22:05:12 +0800 Subject: [PATCH 1/2] ci/depoly: depoly to production if tagging version --- .forgejo/workflows/depoly.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/depoly.yml b/.forgejo/workflows/depoly.yml index a367480..a64b095 100644 --- a/.forgejo/workflows/depoly.yml +++ b/.forgejo/workflows/depoly.yml @@ -1,5 +1,10 @@ -on: ['push'] +on: + push: + branches: + - master + tags: + - "v*" jobs: depoly: @@ -26,11 +31,19 @@ jobs: - name: Build Dist run: pnpm dist - - name: Depoly to Cloudflare + - name: Depoly to Preview uses: https://github.com/cloudflare/wrangler-action@v3 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} command: pages deploy --project-name=tututheapp dist - if: "env.GITHUB_REF_NAME == 'master'" + if: github.event.ref_type == 'branch' + + - name: Depoly to Production + uses: https://github.com/cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + command: pages deploy --project-name=tututheapp dist --branch=production + if: github.event.ref_type == 'tag' From cac01f1dab087b8946b969d5783a5f4700b4ea2b Mon Sep 17 00:00:00 2001 From: thislight Date: Sun, 14 Jul 2024 22:06:12 +0800 Subject: [PATCH 2/2] start the first version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cef961e..2e4f1f3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package", "name": "tutu", - "version": "0.1.0", + "version": "1.0.0", "description": "", "private": true, "type": "module",