Skip to content

Commit

Permalink
feat: add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
l3d00m committed Oct 6, 2023
1 parent 32c3f5a commit 232fbb1
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 44 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: ci

on:
push:
pull_request:
merge_group:
workflow_dispatch:

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # v4
- uses: actions/setup-node@v3 # v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install dependencies 📦
run: yarn install --immutable
- name: Run typecheck
run: yarn run typecheck
- name: Run build
run: yarn run build
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release
on:
push:
branches: [main]

permissions:
contents: read # for checkout

jobs:
release:
name: Release
environment:
name: production
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lib

# Created by https://www.toptal.com/developers/gitignore/api/yarn,Node
# Edit at https://www.toptal.com/developers/gitignore?templates=yarn,Node

Expand Down
54 changes: 13 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,33 @@

[![npm package][npm-img]][npm-url]
[![Build Status][build-img]][build-url]
[![Downloads][downloads-img]][downloads-url]
[![Issues][issues-img]][issues-url]
[![Code Coverage][codecov-img]][codecov-url]
[![Commitizen Friendly][commitizen-img]][commitizen-url]
[![Semantic Release][semantic-release-img]][semantic-release-url]

> My awesome module
TODO description

## Credits

https://github.com/ajomuch92/vue-enter-to-tab

## Install

NPM:

```bash
npm install vue3-enter-to-tab
npm i --save vue3-enter-to-tab
yarn add vue3-enter-to-tab
```

## Usage

```ts
import { myPackage } from 'vue3-enter-to-tab';
import { useEnterToTab } from 'vue3-enter-to-tab'

myPackage('hello');
myPackage('hello')
//=> 'hello from my package'
```

## API

### myPackage(input, options?)

#### input

Type: `string`

Lorem ipsum.

#### options

Type: `object`

##### postfix
**Note**: This directive doesn't work on textarea elements.

Type: `string`
Default: `rainbows`
Any contribution is welcome. Visit my web page [here](https://www.ajomuch92.site/#/).

Lorem ipsum.

[build-img]:https://github.com/l3d00m/vue3-enter-to-tab/actions/workflows/release.yml/badge.svg
[build-url]:https://github.com/l3d00m/vue3-enter-to-tab/actions/workflows/release.yml
[downloads-img]:https://img.shields.io/npm/dt/vue3-enter-to-tab
[downloads-url]:https://www.npmtrends.com/vue3-enter-to-tab
[npm-img]:https://img.shields.io/npm/v/vue3-enter-to-tab
[npm-url]:https://www.npmjs.com/package/vue3-enter-to-tab
[issues-img]:https://img.shields.io/github/issues/l3d00m/vue3-enter-to-tab
[issues-url]:https://github.com/l3d00m/vue3-enter-to-tab/issues
[codecov-img]:https://codecov.io/gh/l3d00m/vue3-enter-to-tab/branch/main/graph/badge.svg
[codecov-url]:https://codecov.io/gh/l3d00m/vue3-enter-to-tab
[semantic-release-img]:https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
[semantic-release-url]:https://github.com/semantic-release/semantic-release
[commitizen-img]:https://img.shields.io/badge/commitizen-friendly-brightgreen.svg
[commitizen-url]:http://commitizen.github.io/cz-cli/
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"lib/**/*"
],
"scripts": {
"build": "tsc --project tsconfig.build.json",
"build": "tsc --project tsconfig.json",
"typecheck": "tsc --noEmit"
},
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -421,11 +421,11 @@ __metadata:

"typescript@patch:[email protected]#~builtin<compat/typescript>":
version: 5.2.2
resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin<compat/typescript>::version=5.2.2&hash=14eedb"
resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin<compat/typescript>::version=5.2.2&hash=f3b441"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 07106822b4305de3f22835cbba949a2b35451cad50888759b6818421290ff95d522b38ef7919e70fb381c5fe9c1c643d7dea22c8b31652a717ddbd57b7f4d554
checksum: 0f4da2f15e6f1245e49db15801dbee52f2bbfb267e1c39225afdab5afee1a72839cd86000e65ee9d7e4dfaff12239d28beaf5ee431357fcced15fb08583d72ca
languageName: node
linkType: hard

Expand Down

0 comments on commit 232fbb1

Please sign in to comment.