Skip to content

Commit

Permalink
feat: adds actions to relase to github registry
Browse files Browse the repository at this point in the history
  • Loading branch information
rhandrade committed Dec 11, 2024
1 parent 92aa40e commit adeaa36
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 4 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/release.action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 'Release DS'

on:
release:
types: [published]

env:
NODE_VERSION: 20.x

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- run: npm ci
- run: npm run build
- uses: actions/upload-artifact@v4
with:
name: ds-build
path: dist/

publish:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: ds-build
path: dist/
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://npm.pkg.github.com/
scope: '@uxshop'
cache: 'npm'
- run: npm ci
- run: ls dist/
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"name": "design-system",
"version": "4.0.0-alpha",
"name": "@uxshop/design-system",
"version": "4.0.0-beta",
"type": "module",
"engines": {
"node": ">=20.10.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/uxshop/design-system.git"
},
"scripts": {
"dev": "vite",
"preview": "vite preview --port 5050",
Expand All @@ -19,8 +23,7 @@
"storybook": "storybook dev -p 6006",
"storybook:build": "storybook build",
"storybook:sass:compile": "tsx .storybook/compile.ts",
"prepare": "husky",
"postinstall": "npm run build"
"prepare": "husky"
},
"peerDependencies": {
"typescript": ">= 5.5.0",
Expand Down

0 comments on commit adeaa36

Please sign in to comment.