Skip to content

Build and Publish Action #8

Build and Publish Action

Build and Publish Action #8

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.ref == 'refs/heads/main'
runs-on: ubuntu-latest
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@v2
with:
name: action
path: dist