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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
76 changes: 76 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: CI
on:
push:
branches: [main]
paths-ignore:
- "README.md"
pull_request:
branches: [main]
paths-ignore:
- "README.md"

permissions:
pull-requests: write
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 20.x
- run: npm ci
- run: npm run build
- run: npm run format-check
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: action.yaml
path: action.yaml
if-no-files-found: error

test:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
needs: [build]
runs-on: ubuntu-latest
strategy:
matrix:
target: [built, committed]
steps:
- uses: actions/checkout@v5
- if: matrix.target == 'built' || github.event_name == 'pull_request'
uses: actions/download-artifact@v5
with:
name: dist
path: dist
- if: matrix.target == 'built' || github.event_name == 'pull_request'
uses: actions/download-artifact@v5
with:
name: action.yaml
path: .

package:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/download-artifact@v5
with:
name: dist
path: dist
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update distribution
title: Update distribution
body: |
- Updates the distribution for changes on `main` by CI
branch: update-distribution
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
/lib
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/
node_modules/
lib/
2 changes: 1 addition & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ inputs:
default: ""
runs:
using: "node20"
main: "index.js"
main: "dist/index.cjs"
Loading