Skip to content

Commit

Permalink
Prepared github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Toliak committed Aug 7, 2022
1 parent f2a0781 commit e8e4468
Show file tree
Hide file tree
Showing 4 changed files with 189 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/----bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: '⚠️ Bug report'
about: Create a report to help us improve
title: '⚠️ Name of the issue'
labels: bug
assignees: ''
---

# Describe the bug

A clear and concise description of what the bug is.

## To Reproduce

Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

## Expected behavior

A clear and concise description of what you expected to happen.

## Screenshots

If applicable, add screenshots to help explain your problem.

# Desktop information

Provide you OS version information

## NPM Version

<!--Run `npm version` command -->

```
Paste result here
```

## NPM Package versions

<!--Run `npm list --depth 0` command -->

```
Paste result here
```

# Additional context

Add any other context about the problem here.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/---feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: '⭐ Feature request'
about: Suggest an idea for this project
title: '⭐ Name of the issue'
labels: enhancement
assignees: ''
---

# Description

A clear description of the feature

## Is your feature request related to a problem? Please describe.

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

# Suggestion

## Describe the solution you'd like

A clear and concise description of what you want to happen.

## Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

# Additional context

Add any other context or screenshots about the feature request here.
32 changes: 32 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: 2
updates:
# Fetch and update latest `npm` packages
- package-ecosystem: npm
directory: '/'
schedule:
interval: daily
time: '00:00'
open-pull-requests-limit: 10
reviewers:
- toliak
assignees:
- toliak
commit-message:
prefix: fix
prefix-development: chore
include: scope
# Fetch and update latest `github-actions` pkgs
- package-ecosystem: github-actions
directory: '/'
schedule:
interval: daily
time: '00:00'
open-pull-requests-limit: 10
reviewers:
- toliak
assignees:
- toliak
commit-message:
prefix: fix
prefix-development: chore
include: scope
76 changes: 76 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: NPM Package

on:
pull_request:
paths-ignore:
- '**.md'
push:
paths-ignore:
- '**.md'

jobs:
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup node 14
uses: actions/setup-node@v3
with:
node-version: 14.x
- name: Cache Node files
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: |
~/.npm
./transformer
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Update NPM
run: npm install -g npm
- name: Install dependencies
run: npm ci
- name: Run prettier
run: npm run prettier
publish:
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs:
- test
- prettier
steps:
- uses: actions/checkout@v3
- name: Setup node 14
uses: actions/setup-node@v3
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- name: Cache Node files
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: |
~/.npm
./transformer
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Update NPM
run: npm install -g npm
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Run publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit e8e4468

Please sign in to comment.