diff --git a/.gitea/workflows/build-publish.yaml b/.gitea/workflows/build-publish.yaml new file mode 100644 index 0000000..f08fc84 --- /dev/null +++ b/.gitea/workflows/build-publish.yaml @@ -0,0 +1,58 @@ +name: Test, Build, Deploy +on: [push] + +jobs: + Test-Build-Deploy: + name: Test, Build, and Deploy + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + + - name: Install Node.js + uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f + with: + node-version-file: .node-version + + - name: Install Wrangler + run: npm install -g wrangler + + - name: Install Dependencies + run: npm install + + - name: Check Formatting + run: npm run check-format + + - name: Build + run: npm run build + + - name: Deploy + run: wrangler pages deploy public --project-name $CLOUDFLARE_PROJECT_NAME + + env: + CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CLOUDFLARE_PROJECT_NAME: ${{ vars.CLOUDFLARE_PROJECT_NAME }} + + Sentry-Release: + name: Create Sentry Release + runs-on: ubuntu-latest + needs: Test-Build-Deploy + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + + - name: Install Sentry SDK + run: curl -sL https://sentry.io/get-cli/ | bash + + - name: Propose and Create Release Version + run: | + VERSION=$(sentry-cli releases propose-version) + sentry-cli releases new $VERSION + sentry-cli releases set-commits --auto $VERSION + sentry-cli releases finalize $VERSION + + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_ORG: ${{ vars.SENTRY_ORG }} + SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }} diff --git a/package.json b/package.json index 70381a9..3a131f9 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "type": "module", "scripts": { "build": "remix build --sourcemap", + "check-format": "prettier -c .", "format": "prettier -wc .", "publish": "remix build --sourcemap && wrangler pages deploy public" },