Skip to content

Commit

Permalink
feat(ci): switch from travis to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ppoffice committed Aug 15, 2020
1 parent 0f73884 commit ad8806d
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 56 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/github-release.yml
@@ -0,0 +1,20 @@
name: GitHub Release

on:
push:
tags:
- "*"

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: false
12 changes: 12 additions & 0 deletions .github/workflows/lint.yml
@@ -0,0 +1,12 @@
name: Code Linting

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: npm install
- run: npm run lint
18 changes: 18 additions & 0 deletions .github/workflows/npm-publish.yml
@@ -0,0 +1,18 @@
name: Node.js Package

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,33 @@
name: Test

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10, latest]
fail-fast: false
steps:
- uses: actions/checkout@v2
with:
repository: hexojs/hexo-starter
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v1
with:
path: node_modules
key: npm-cache
restore-keys: npm-cache
- run: npm install
- uses: actions/checkout@v2
with:
path: themes/icarus
- uses: actions/checkout@v2
with:
repository: SukkaLab/hexo-many-posts
path: source/_posts/hexo-many-posts
- run: npx hexo config theme next
- run: time npx hexo g
5 changes: 5 additions & 0 deletions .npmignore
@@ -0,0 +1,5 @@
.github/
.eslintignore
.eslintrc.json
.travis.yml
yarn.lock
52 changes: 0 additions & 52 deletions .travis.yml

This file was deleted.

17 changes: 13 additions & 4 deletions package.json
@@ -1,13 +1,22 @@
{
"name": "hexo-theme-icarus",
"version": "4.0.0-rc.1",
"author": "ppoffice <ppoffice@users.noreply.github.com>",
"license": "MIT",
"description": "A simple, delicate, and modern theme for Hexo",
"keywords": [
"hexo",
"theme",
"icarus"
],
"homepage": "https://github.com/ppoffice/hexo-theme-icarus",
"repository": "https://github.com/ppoffice/hexo-theme-icarus.git",
"bugs": {
"url": "https://github.com/ppoffice/hexo-theme-icarus/issues"
},
"engines": {
"node": ">=10.13.0"
},
"description": "A simple, delicate, and modern theme for Hexo",
"repository": "https://github.com/ppoffice/hexo-theme-icarus.git",
"author": "ppoffice <ppoffice@users.noreply.github.com>",
"license": "MIT",
"scripts": {
"lint": "eslint --ext .js --ext .jsx --ext .json ."
},
Expand Down

0 comments on commit ad8806d

Please sign in to comment.