Skip to content

Commit

Permalink
chore: update workflows config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jul 17, 2023
1 parent 17548cf commit 06c7cbc
Showing 1 changed file with 52 additions and 39 deletions.
91 changes: 52 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,37 @@ jobs:
- run: npm run type-check
- run: npm run coverage

- name: Converts Markdown to HTML
uses: jaywcjlove/markdown-to-html-cli@main
with:
output: coverage/index.html
github-corners: https://github.com/jaywcjlove/colors-named-decimal
favicon: data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🎨</text></svg>
- name: Create idoc config.
run: |
cat > idoc.yml << EOF
site: "Colors Named Decimal {{version}}"
menus:
Home: index.html
Named: https://jaywcjlove.github.io/colors-named/
Hex: https://jaywcjlove.github.io/colors-named-hex/
EOF
- run: npm install idoc@1.26.6 -g
- run: idoc

# - name: Converts Markdown to HTML
# uses: jaywcjlove/markdown-to-html-cli@main
# with:
# output: coverage/index.html
# github-corners: https://github.com/jaywcjlove/colors-named-decimal
# favicon: data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🎨</text></svg>

- name: Create Coverage Badges
uses: jaywcjlove/coverage-badges-cli@main
with:
source: coverage/coverage-summary.json
output: coverage/badges.svg
output: dist/badges.svg

- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
with:
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
output: coverage/CONTRIBUTORS.svg
output: dist/CONTRIBUTORS.svg
avatarSize: 42

- name: Create Tag
Expand All @@ -54,7 +67,7 @@ jobs:
with:
commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./coverage
publish_dir: ./dist

- name: Generate Changelog
id: changelog
Expand Down Expand Up @@ -89,33 +102,33 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

outputs:
successful: ${{steps.create_tag.outputs.successful }}

github-package:
runs-on: ubuntu-latest
needs: build-deploy
if: needs.build-deploy.outputs.successful
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://npm.pkg.github.com
scope: '@jaywcjlove'

- run: npm install
- run: npm run build

- name: "Modify colors-named-decimal => @jaywcjlove/colors-named-decimal"
uses: jaywcjlove/github-action-package@main
with:
path: package.json
data: |
{ "name": "@jaywcjlove/colors-named-decimal" }
- run: npm publish
name: 📦 @jaywcjlove/colors-named-decimal publish to NPM
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
# outputs:
# successful: ${{steps.create_tag.outputs.successful }}

# github-package:
# runs-on: ubuntu-latest
# needs: build-deploy
# if: needs.build-deploy.outputs.successful
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: 16
# registry-url: https://npm.pkg.github.com
# scope: '@jaywcjlove'

# - run: npm install
# - run: npm run build

# - name: "Modify colors-named-decimal => @jaywcjlove/colors-named-decimal"
# uses: jaywcjlove/github-action-package@main
# with:
# path: package.json
# data: |
# { "name": "@jaywcjlove/colors-named-decimal" }

# - run: npm publish
# name: 📦 @jaywcjlove/colors-named-decimal publish to NPM
# continue-on-error: true
# env:
# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 06c7cbc

Please sign in to comment.