aboutsummaryrefslogtreecommitdiff
path: root/.gitea/workflows/publish.yml
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-02-06 01:31:20 +0300
committerValentin Popov <valentin@popov.link>2026-02-06 01:31:20 +0300
commit08dac92ead9014827f92456e3cce566ad654678a (patch)
tree16ec6986bc88f33b6d0e094660cee25956bba933 /.gitea/workflows/publish.yml
parentd387c7bf8ae7711858b3348a6efa28bfeb8e878b (diff)
downloadstrapi-plugin-checkbox-list-08dac92ead9014827f92456e3cce566ad654678a.tar.xz
strapi-plugin-checkbox-list-08dac92ead9014827f92456e3cce566ad654678a.zip
Add .npmignore, LICENSE.txt, and update README.md
- Created a .npmignore file to exclude unnecessary files and directories from npm packages. - Added LICENSE.txt to specify the licensing terms for the project. - Expanded README.md to include detailed plugin features, installation instructions, usage guidelines, and contribution information. - Updated package.json to reflect new repository URLs for issues and homepage.
Diffstat (limited to '.gitea/workflows/publish.yml')
-rw-r--r--.gitea/workflows/publish.yml75
1 files changed, 75 insertions, 0 deletions
diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml
new file mode 100644
index 0000000..d689f37
--- /dev/null
+++ b/.gitea/workflows/publish.yml
@@ -0,0 +1,75 @@
+name: Publish
+
+on:
+ push:
+ tags:
+ - "v*"
+
+jobs:
+ test:
+ name: Tests
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Setup Node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: "npm"
+ cache-dependency-path: |
+ package-lock.json
+ playground/package-lock.json
+ - name: Write playground .env
+ run: |
+ printf '%s' "${{ secrets.PLAYGROUND_ENV_BASE64 }}" | base64 -d > playground/.env
+ - name: Install root deps
+ run: npm ci
+ - name: Build plugin
+ run: npm run build
+ - name: Verify plugin
+ run: npm run verify
+ - name: Pack plugin into playground .yalc
+ run: |
+ TARBALL=$(npm pack --silent)
+ mkdir -p playground/.yalc/strapi-plugin-checkbox-list
+ tar -xzf "$TARBALL" -C playground/.yalc/strapi-plugin-checkbox-list --strip-components=1
+ - name: Install playground deps
+ working-directory: playground
+ run: npm install
+ - name: Build playground
+ working-directory: playground
+ run: npm run build
+ - name: Integration tests
+ working-directory: playground
+ run: npm run test:integration
+
+ publish:
+ name: Publish to NPM
+ runs-on: ubuntu-latest
+ needs: test
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Setup Node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ registry-url: https://registry.npmjs.org/
+ cache: "npm"
+ cache-dependency-path: package-lock.json
+ - name: Install deps
+ run: npm ci
+ - name: Clean build artifacts
+ run: rm -rf dist
+ - name: Build plugin
+ run: npm run build
+ - name: Verify plugin
+ run: npm run verify
+ - name: Clean workspace for publish
+ run: |
+ rm -rf playground tests admin server node_modules .gitea .github
+ - name: Publish
+ run: npm publish
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}