mirror of
https://github.com/jlengrand/create-1.git
synced 2026-03-10 08:11:25 +00:00
chore: add CI
This commit is contained in:
3
.github/pull_request_template.md
vendored
Normal file
3
.github/pull_request_template.md
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
## What I did
|
||||
|
||||
1.
|
||||
53
.github/workflows/release.yml
vendored
Normal file
53
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
release:
|
||||
# Prevents changesets action from creating a PR on forks
|
||||
if: github.repository == 'open-wc/create'
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node.js 12.x
|
||||
uses: actions/setup-node@master
|
||||
with:
|
||||
node-version: 12.x
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn --frozen-lockfile
|
||||
|
||||
- name: Build package
|
||||
run: yarn build
|
||||
|
||||
- name: Setup Git User
|
||||
run: |
|
||||
git config --global user.email "hello@modern-web.dev"
|
||||
git config --global user.name "Modern Web"
|
||||
|
||||
- name: Release & Publish
|
||||
run: npm run release
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
42
.github/workflows/verify-node.yml
vendored
Normal file
42
.github/workflows/verify-node.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Verify Node
|
||||
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
verify-linux:
|
||||
name: Verify linux
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x, 14.x]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Node ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn --frozen-lockfile
|
||||
|
||||
- name: Build packages
|
||||
run: yarn build
|
||||
|
||||
- name: Lint
|
||||
run: yarn lint
|
||||
|
||||
- name: Test
|
||||
run: yarn test
|
||||
41
.github/workflows/verify-windows.yml
vendored
Normal file
41
.github/workflows/verify-windows.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Verify Windows
|
||||
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
verify-windows:
|
||||
name: Verify windows
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Set git to use LF
|
||||
run: |
|
||||
git config --global core.autocrlf false
|
||||
git config --global core.eol lf
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Node 12.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn --frozen-lockfile
|
||||
|
||||
- name: Build
|
||||
run: yarn build
|
||||
|
||||
- name: Test
|
||||
run: yarn test
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@open-wc/create",
|
||||
"version": "0.36.0",
|
||||
"version": "0.37.0",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
@@ -21,6 +21,7 @@
|
||||
"lint": "npm run lint:eslint && npm run lint:prettier",
|
||||
"lint:eslint": "eslint --ext .ts,.js,.mjs,.cjs .",
|
||||
"lint:prettier": "prettier \"**/*.{ts,js,mjs,cjs,md}\" --check --ignore-path .eslintignore",
|
||||
"release": "standard-version && git push --follow-tags origin master && npm publish",
|
||||
"start": "npm run build && node ./dist/create.js",
|
||||
"test": "npm run test:node",
|
||||
"test:node": "mocha --require @babel/register",
|
||||
@@ -57,9 +58,11 @@
|
||||
"chai-fs": "^2.0.0",
|
||||
"eslint": "^7.11.0",
|
||||
"eslint-config-prettier": "^6.13.0",
|
||||
"lit-element": "^2.4.0",
|
||||
"mocha": "^6.2.2",
|
||||
"onchange": "^5.2.0",
|
||||
"prettier": "^2.1.2"
|
||||
"prettier": "^2.1.2",
|
||||
"standard-version": "^9.0.0"
|
||||
},
|
||||
"prettier": {
|
||||
"singleQuote": true,
|
||||
|
||||
Reference in New Issue
Block a user