Skip to content

Commit

Permalink
code corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
milankomaj committed Jul 10, 2024
1 parent d180145 commit 07e12db
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 21 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- '**.js'
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: Dependency Review
uses: actions/dependency-review-action@main
15 changes: 5 additions & 10 deletions .github/workflows/gen_icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ jobs:
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: 'latest'

- name: test
shell: bash
run: |
run: |
find_svg=$(find -name '*.svg' -type f -printf "%f\n")
sed -i "s/REPLACE/${find_svg}/" ${{ github.workspace }}/generate-icons/test.js
cat ${{ github.workspace }}/generate-icons/test.js
- run: npm install --save
- run: npm install --save
- run: npm run Folder
- run: npm run Test

- name: tree
- name: tree
run: |
echo ***/icons/***
tree -h ./icons/
Expand All @@ -46,12 +46,7 @@ jobs:
mv ${{ github.workspace }}/generate-icons/output/*.svg ${{ github.workspace }}/dev-badge-icon/icons
mv ${{ github.workspace }}/generate-icons/icons.json ${{ github.workspace }}/dev-badge-icon
git status
git add ${{ github.workspace }}/dev-badge-icon/icons/*.svg
git add ${{ github.workspace }}/dev-badge-icon/icons/*.svg
git add ${{ github.workspace }}/dev-badge-icon/icons.json
git commit -m "new icon relase"
git push

22 changes: 12 additions & 10 deletions .github/workflows/npm_publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Publish Package to npmjs
on:
workflow_dispatch:

workflow_run:
workflows: ["Generate icons"]
types: [completed]

jobs:
build:
Expand All @@ -12,7 +14,7 @@ jobs:
id-token: write
outputs:
output1: ${{ steps.step1.outputs.VERSION }}
# output2: ${{ steps.step1.outputs.SVG }}
output2: ${{ steps.step1.outputs.SVG }}
defaults:
run:
working-directory: ./dev-badge-icon
Expand All @@ -39,14 +41,14 @@ jobs:
echo VERSION=$VERSION
echo $VERSION
echo "VERSION=$(echo $VERSION)" >> $GITHUB_OUTPUT
# SVG=$(find ${{ github.workspace }}/generate-icons/ -name '*.svg' -type f -printf "%f\n")
# echo SVG=$SVG
# echo $SVG
# echo "SVG=$(echo $SVG)" >> $GITHUB_OUTPUT
SVG=$(find ${{ github.workspace }}/generate-icons/ -name '*.svg' -type f -printf "%f\n")
echo SVG=$SVG
echo $SVG
echo "SVG=$(echo $SVG)" >> $GITHUB_OUTPUT
- run: npm ci
- run: npm publish
- run: npm version ${{ github.event.release.tag_name }}
- run: echo "$GITHUB_CONTEXT"
# - run: echo "$GITHUB_CONTEXT"
- run: sleep 2m
- run: npm run version

Expand All @@ -56,10 +58,10 @@ jobs:
run: |
git config --global user.email ${{ secrets.EMAIL }}
git config --global user.name ${{ secrets.NAME }}
# rm -fv ${{ github.workspace }}/generate-icons/icons/*.svg
rm -fv ${{ github.workspace }}/generate-icons/icons/*.svg
git add -A
# echo ${{ steps.step1.outputs.SVG }}
echo ${{ steps.step1.outputs.SVG }}
echo ${{ steps.step1.outputs.VERSION }}
git commit -m "${{ steps.step1.outputs.VERSION}}"
git commit -m "${{ steps.step1.outputs.SVG }}"
git status
git push
2 changes: 1 addition & 1 deletion dev-badge-icon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/milankomaj/dev-badge-icon.git",
"url": "git+https://github.com/milankomaj/dev-badge-icon.git",
"directory": "dev-badge-icon"
}
}

0 comments on commit 07e12db

Please sign in to comment.