Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
Signed-off-by: macdonst <[email protected]>
  • Loading branch information
macdonst committed Jul 29, 2024
0 parents commit 3d248f7
Show file tree
Hide file tree
Showing 9 changed files with 550 additions and 0 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Node CI

# Push tests commits; pull_request tests PR merges
on: [ push, pull_request ]

defaults:
run:
shell: bash

jobs:

# Test the build
build:
# Setup
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 18.x, 20.x ]
os: [ windows-latest, ubuntu-latest, macOS-latest ]

# Go
steps:
- name: Check out repo
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Env
run: |
echo "Event name: ${{ github.event_name }}"
echo "Git ref: ${{ github.ref }}"
echo "GH actor: ${{ github.actor }}"
echo "SHA: ${{ github.sha }}"
VER=`node --version`; echo "Node ver: $VER"
VER=`npm --version`; echo "npm ver: $VER"
- name: Install
run: npm install

- name: Test
run: npm test

- name: Integration Tests
uses: enhance-dev/actions/integration@main
with:
use_local_package: 'true'

# ----- Only git tag testing + package publishing beyond this point ----- #

# Publish to package registries
publish:
# Setup
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest

# Go
steps:
- name: Check out repo
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Install
run: npm install

# Publish to npm
- name: Publish @RC to npm
if: contains(github.ref, 'RC')
run: npm publish --tag RC --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish @latest to npm
if: contains(github.ref, 'RC') == false #'!contains()'' doesn't work lol
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "CLA Assistant"
on:
issue_comment:
types: [created]
pull_request_target:
types: [opened,closed,synchronize]

permissions:
actions: write
contents: write
pull-requests: write
statuses: write

jobs:
CLAAssistant:
runs-on: ubuntu-latest
steps:
- name: "CLA Assistant"
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
uses: contributor-assistant/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
with:
path-to-signatures: 'signatures/v1/cla.json'
path-to-document: 'https://github.com/enhance-dev/.github/blob/main/CLA.md'
branch: 'main'
allowlist: brianleroux,colepeters,kristoferjoseph,macdonst,ryanbethel,ryanblock,tbeseda
remote-organization-name: enhance-dev
remote-repository-name: .github
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
node_modules
.vscode
270 changes: 270 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3d248f7

Please sign in to comment.