Skip to content

Commit

Permalink
ci: add github action for semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
lzear committed Oct 18, 2020
1 parent 7c94cde commit 358dfd3
Show file tree
Hide file tree
Showing 6 changed files with 1,138 additions and 1,780 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Semantic release"

on:
push:
branches: [master,next]

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: '12'
- run: yarn install
- run: yarn build
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
14 changes: 0 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,3 @@ after_success:
branches:
except:
- /^v\d+\.\d+\.\d+$/


jobs:
include:
# Define the release stage that runs semantic-release
- stage: release
node_js: lts/*
# Advanced: optionally overwrite your default `script` step to skip the tests
# script: skip
deploy:
provider: script
skip_cleanup: true
script:
- npx semantic-release
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Votes

![Semantic release](https://github.com/lzear/votes/workflows/Semantic%20release/badge.svg)

Implementation of some [electoral systems](https://en.wikipedia.org/wiki/Electoral_system)
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"author": "lzear",
"repository": {
"type": "git",
"url": "git+https://github.com/lzear/votes.git"
"url": "https://github.com/lzear/votes.git"
},
"license": "MIT",
"engines": {
Expand All @@ -30,7 +30,7 @@
"deploy-docs": "ts-node tools/gh-pages-publish",
"report-coverage": "cat ./coverage/lcov.info | coveralls",
"commit": "git-cz",
"semantic-release": "dotenv -e .env semantic-release",
"semantic-release": "semantic-release",
"semantic-release-prepare": "ts-node tools/semantic-release-prepare",
"precommit": "lint-staged",
"travis-deploy-once": "travis-deploy-once",
Expand Down Expand Up @@ -60,6 +60,7 @@
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@semantic-release/exec": "^5.0.0",
"@types/jest": "^26.0.14",
"@types/lodash": "^4.14.162",
"@types/node": "^14.11.10",
Expand Down Expand Up @@ -108,5 +109,11 @@
"directories": {
"doc": "docs",
"test": "test"
},
"release": {
"branches": [
"master",
"next"
]
}
}
4 changes: 1 addition & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,5 @@
"types": ["node", "jest"]
},
"types": ["node", "jest"],
"include": [
"src", "test"
]
"include": ["src"]
}
Loading

0 comments on commit 358dfd3

Please sign in to comment.