Skip to content

Commit

Permalink
refactor: Rename the package and publish
Browse files Browse the repository at this point in the history
  • Loading branch information
puria committed Jan 22, 2024
1 parent 239cfea commit b995060
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 38 deletions.
95 changes: 59 additions & 36 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,62 @@ permissions:
id-token: write

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- run: pnpm install
- run: pnpm run test

docs:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: bitovi/[email protected]
with:
install_command: pnpm install
build_command: pnpm run build && pnpm run build-storybook
path: storybook-static

release-please:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
steps:
- uses: google-github-actions/release-please-action@v4
with:
release-type: node
token: ${{ secrets.PAT }}
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- run: pnpm install
- run: pnpm run test

docs:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: bitovi/[email protected]
with:
install_command: pnpm install
build_command: pnpm run build && pnpm run build-storybook
path: storybook-static

release-please:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: node
token: ${{ secrets.PAT }}

- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}

- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}

- uses: pnpm/action-setup@v2
if: ${{ steps.release.outputs.release_created }}

- run: |
pnpm install
pnpm build
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: ${{ steps.release.outputs.release_created }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "didroom-components",
"name": "@didroom/components",
"version": "1.2.1",
"description": "Stencil Component Starter",
"main": "dist/index.cjs.js",
Expand Down
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"></div>
<span class="ms-3 text-sm font-medium text-gray-900 dark:text-gray-300">Dark mode</span>
</label>
<h1>Test page</h1>
<h1 class="text-3xl font-sans font-bold py-8">Test page</h1>
<didroom-avatar name="Fortis Fortuy"></didroom-avatar>
</body>
</html>

0 comments on commit b995060

Please sign in to comment.