Skip to content

Build and Publish Action #13

Build and Publish Action

Build and Publish Action #13

name: Build and Publish Action
on:
workflow_run:
workflows: ["Validate Action", "Run unit tests", "ESLint Check"]
types:
- completed
jobs:
build:
if: >
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.workflow_id == github.event.workflow_run.workflow_id &&
github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
concurrency: build-and-publish
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "20"
- name: Install dependencies
run: npm install
- name: Build action with ncc
run: npm run build
- name: Publish to GitHub
uses: actions/upload-artifact@v4
with:
name: action
path: dist