diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e1f50a8..f001345 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,12 @@ jobs: with: fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org/' + - name: Install GitVersion uses: gittools/actions/gitversion/setup@v3.2.1 @@ -31,19 +37,24 @@ jobs: useConfigFile: true configFilePath: GitVersion.yml - - name: Install NPM Packages - shell: pwsh - run: npm i + - name: Install dependencies + run: npm ci - name: Build Project - shell: pwsh run: npm run build - - name: Publish to NPM - if: startsWith(github.ref, 'refs/tags/') - shell: pwsh + - name: Set version + run: npm version ${{ steps.gitversion.outputs.fullSemVer }} --no-git-tag-version + + - name: Configure npm authentication run: | - npm version ${{ steps.gitversion.outputs.fullSemVer }} --no-git-tag-version - npm publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc + echo "@mikeleg:registry=https://registry.npmjs.org/" >> ~/.npmrc + + - name: Publish to NPM (tag) + if: github.ref_type == 'tag' + run: npm publish --access public + + - name: Publish to NPM (prerelease) + if: github.ref_type != 'tag' + run: npm publish --access public --tag prerelease \ No newline at end of file diff --git a/logo.png b/logo.png index 53ec4ba..f257213 100644 Binary files a/logo.png and b/logo.png differ diff --git a/package-lock.json b/package-lock.json index e1c118d..462aaa1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "flexsaber", + "name": "@mikeleg/flexsaber", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index 63c3e1b..42b282c 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,36 @@ { + "name": "@mikeleg/flexsaber", "scripts": { "build": "vite build" }, "dependencies": { "vite": "^6.3.5" - } + }, + "publishConfig": { + "access": "public" + }, + "description": "Flexsaber is a declarative Web Components library for building flexible layouts using Flexbox. Designed to work in plain HTML, frontend frameworks, or no-code environments. Precise, modular, and powerful like a lightsaber.\",", + "repository": { + "type": "git", + "url": "git+https://github.com/mikeleg/flexsaber.git" + }, + "keywords": [ + "html", + "frontend", + "web-components", + "flexbox", + "ui-library" + ], + "author": " (https://github.com/mikeleg)", + "contributors": [ + { + "name": "davide-pi", + "url": "https://github.com/davide-pi" + } + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/mikeleg/flexsaber/issues" + }, + "homepage": "https://github.com/mikeleg/flexsaber#readme" }