Skip to content

Commit

Permalink
Configure GitHub files
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiodxa committed Jul 11, 2023
1 parent 7877bd3 commit c04a83a
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/funding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: sergiodxa
17 changes: 17 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
changelog:
categories:
- title: New Features
labels:
- enhancement
- title: Documentation Changes
labels:
- documentation
- title: Bug Fixes
labels:
- bug
- title: Deprecations
labels:
- deprecated
- title: Other Changes
labels:
- "*"
39 changes: 39 additions & 0 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Bump version

on:
workflow_dispatch:
inputs:
version:
description: "Semver type of new version (major / minor / patch)"
required: true
type: choice
options:
- major
- minor
- patch

jobs:
bump-version:
name: Bump version
runs-on: ubuntu-latest
steps:
- name: Check out source
uses: actions/checkout@v2
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "16"
cache: "npm"
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Setup Git
run: |
git config user.name 'Sergio Xalambrí'
git config user.email 'hello@sergiodxa.com'
- name: bump version
run: npm version ${{ github.event.inputs.version }}

- name: Push latest version
run: git push origin main --follow-tags
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]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Node LTS
uses: actions/setup-node@v2
with:
node-version: "lts/*"

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Build
run: npm run build

typecheck:
name: Typechecker
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Node LTS
uses: actions/setup-node@v2
with:
node-version: "lts/*"

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Typecheck
run: npm run typecheck

test:
name: Unit and Integration Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Node LTS
uses: actions/setup-node@v2
with:
node-version: "lts/*"

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Test
run: npm run test -- --coverage

lint:
name: Linter
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Node LTS
uses: actions/setup-node@v2
with:
node-version: "lts/*"

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Lint
run: npm run lint
23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish

on:
release:
types: [published]

jobs:
publish-npm:
name: "Publish to npm"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- uses: actions/setup-node@v2
with:
node-version: "lts/*"
registry-url: https://registry.npmjs.org/

- run: npm install

- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit c04a83a

Please sign in to comment.