Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/lint_yml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lint action.yml file

on:
push:
branches:
- '**' # Runs on any branch commit
pull_request:
branches:
- '**' # Runs on any PR commit

jobs:
run-script:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Install action-validator
run: npm install -g @action-validator/core @action-validator/cli --save-dev

- name: Validate action.yml
run: action-validator action.yml
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,40 @@ runs:
steps:
- name: Set up NPM repository
uses: actions/setup-node@v4
shell: bash
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'

- name: Set NPM package name
uses: jaywcjlove/github-action-package@v2.0.0
shell: bash
with:
rename: ${{ inputs.npm-package-name }}

- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{ inputs.npm-token }}
shell: bash
run: |
npm publish

- name: Set up GitHub repository
uses: actions/setup-node@v4
shell: bash
with:
node-version: '20.x'
registry-url: 'https://npm.pkg.github.com'

- name: Set GitHub package name
uses: jaywcjlove/github-action-package@v2.0.0
shell: bash
with:
rename: ${{ inputs.github-package-name }}

- name: Publish to GitHub Packages
env:
NODE_AUTH_TOKEN: ${{ inputs.github-token }}
shell: bash
run: |
npm publish