Skip to content

Commit

Permalink
ci: Set up automated releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Alorel committed Apr 14, 2021
1 parent 2ee496c commit bd801a6
Show file tree
Hide file tree
Showing 16 changed files with 4,297 additions and 104 deletions.
42 changes: 42 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Auto detect text files and perform LF normalization
* text=auto

# Force the following filetypes to have unix eols, so Windows does not break them
*.* text eol=lf

# These files are text and should be normalized (Convert crlf => lf)
.browserlistrc text
*.js text
*.xml text
*.iml text
*.jsx text
*.ts text
*.tsx text
*.yml text
*.yaml text
*.nycrc text
*.toml text
*.pug text
yarn.lock text
*.md text
*.scss text
*.sass text
*.css text
*.less text
*.json text
LICENSE text
CHANGELOG text

*.ico binary
*.png binary
*.jpg binary
*.jpeg binary
*.webp binary
*.mp3 binary
*.wav binary
*.gif binary
*.gz binary
*.tgz binary
*.gz binary
*.br binary
*.tgz binary
86 changes: 86 additions & 0 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Core
on:
- push

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
node:
- 14.x
- 12.x
- 10.x
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Cache
uses: actions/cache@v2
with:
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
path: ~/.npm
- uses: actions/setup-node@v1
name: Set up node
with:
node-version: ${{ matrix.node }}
registry-url: https://npm.pkg.github.com/alorel
- name: Install deps
run: npm install
- name: Test
run: npm test
- name: Upload coverage
if: ${{ matrix.os != 'windows-latest' }}
continue-on-error: true
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: node-${{ matrix.node }}-on-${{ matrix.os }}
parallel: true
posttest:
runs-on: ubuntu-latest
needs: test
continue-on-error: true
steps:
- name: Finalise coverage report
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
release:
runs-on: ${{ matrix.os }}
if: ${{ github.ref == 'refs/heads/master' }}
needs: test
strategy:
matrix:
os:
- ubuntu-latest
node:
- 14.x
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 100
- name: Cache
uses: actions/cache@v2
with:
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
path: ~/.npm
- uses: actions/setup-node@v1
name: Set up node
with:
node-version: ${{ matrix.node }}
registry-url: https://npm.pkg.github.com/alorel
- name: Install deps
run: npm install
- name: Release
run: npm run release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/coverage/
/node_modules/
/npm-debug.log
/.idea/
/.nyc_output/
/*.tgz
3 changes: 3 additions & 0 deletions .idea/.gitignore

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

10 changes: 10 additions & 0 deletions .idea/auto_sync.xml

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

6 changes: 6 additions & 0 deletions .idea/jsLibraryMappings.xml

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

8 changes: 8 additions & 0 deletions .idea/modules.xml

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

15 changes: 15 additions & 0 deletions .idea/shrink-ray.iml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

8 changes: 5 additions & 3 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/coverage/
/benchmark/
/test/
/.nycrc
/.nycrc.yml
/.nyc_output
/.travis.yml
/*.tgz
/.idea
/.github/
/.gitattributes
/.releaserc.js
/.idea/
8 changes: 0 additions & 8 deletions .nycrc

This file was deleted.

5 changes: 5 additions & 0 deletions .nycrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
reporter:
- text
- text-summary
- html
- lcov
31 changes: 31 additions & 0 deletions .releaserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const NPM = '@semantic-release/npm';
const GH = '@semantic-release/github';

module.exports = {
generateNotes: {
config: '@alorel-personal/conventional-changelog-alorel'
},
prepare: [
'@semantic-release/changelog',
NPM,
{
assets: [
'CHANGELOG.md',
'README.md',
'package.json',
'package-lock.json',
],
message: 'chore(release): ${nextRelease.version}',
path: '@semantic-release/git'
}
],
publish: [
NPM,
GH
],
tagFormat: '${version}',
verifyConditions: [
NPM,
GH
]
};
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit bd801a6

Please sign in to comment.