Skip to content

Commit

Permalink
[filigran-icon][version] v0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jpkha committed Jun 14, 2024
1 parent fad8f97 commit 3e80162
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 4 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: NPM Publish

on:
push:
branches:
- main

jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- uses: actions/checkout@v4
- name: Detect package manager
id: detect-package-manager
run: |
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
echo "runner=yarn" >> $GITHUB_OUTPUT
exit 0
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine package manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: https://registry.npmjs.org/

- name: Extract commit message
id: extract_message
run: |
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
echo "commit-message=${COMMIT_MESSAGE}" >> $GITHUB_ENV
- name: Check Filigran-icon
if: startsWith(env.commit-message, '[filigran-icon][version]')
run: echo "package=filigran-icon" >> $GITHUB_ENV

- name: Check Filigran-ui
if: startsWith(env.commit-message, '[filigran-ui][version]')
run: echo "package=filigran-ui" >> $GITHUB_ENV

- name: Install dependencies
if: env.package != ''
run: yarn install && npm install rimraf --global

- name: Publish Filigran UI
if: env.package == 'filigran-ui'
run: npm run publish:filigran-ui
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish Filigran Icon
if: env.package == 'filigran-icon'
run: npm run publish:filigran-icon
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
"scripts": {
"build": "npm run build --workspaces --if-present",
"build:filigran-website": "npm run build -w filigran-website",
"dev": "npm run dev -w filigran-website"
"build:filigran-icon": "npm run build:all -w filigran-icon",
"build:filigran-ui": "npm run build -w filigran-ui",
"dev": "npm run dev -w filigran-website",
"publish:filigran-icon": "yarn build --workspace packages/filigran-icon && npm publish --provenance --access public --workspace packages/filigran-icon",
"publish:filigran-ui": "yarn build --workspace packages/filigran-ui && npm publish --provenance --access public --workspace packages/filigran-ui"
},
"private": true,
"keywords": [],
Expand Down
4 changes: 2 additions & 2 deletions packages/filigran-icon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "filigran-icon",
"version": "0.5.0",
"version": "0.5.1",
"description": "Filigran icon",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand All @@ -27,7 +27,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/FiligranHQ/filigran-ui/tree/main/packages/filigran-icon"
"url": "git+https://github.com/FiligranHQ/filigran-ui.git#main"
},
"files": [
"dist"
Expand Down

0 comments on commit 3e80162

Please sign in to comment.