Skip to content

Commit

Permalink
chore(release): setup Semantic Release (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kocal authored Nov 7, 2020
1 parent 8abf333 commit 7ba2d3a
Show file tree
Hide file tree
Showing 4 changed files with 3,247 additions and 48 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

on:
push:
branches:
- master

env:
CI: true

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://npm.pkg.github.com'
scope: '@yproximite'
always-auth: true

- run: yarn install --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- run: yarn build

- run: yarn semantic-release
env:
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "@yproximite/eslint-config-generator",
"version": "0.0.0-development",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://npm.pkg.github.com/"
},
"description": "ESLint config generator for our internal and public projects. Allows to configure Vue, TypeScript, Prettier, ... plugins.",
"repository": "https://github.com/Yproximite/eslint-config-generator.git",
Expand All @@ -18,7 +19,8 @@
"test:ts": "tsc --noEmit",
"test:unit": "jest",
"prelint": "yarn run build",
"lint": "eslint . --ext .js,.ts"
"lint": "eslint . --ext .js,.ts",
"semantic-release": "semantic-release"
},
"engines": {
"node": "^10.13.0 || ^12.13.0 || >=14.0.0"
Expand Down Expand Up @@ -52,6 +54,7 @@
"@babel/eslint-parser": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"@babel/preset-typescript": "^7.12.1",
"@kocal/semantic-release-preset": "^2.0.9",
"@rollup/plugin-babel": "^5.2.1",
"@rollup/plugin-node-resolve": "^9.0.0",
"@types/eslint": "^7.2.4",
Expand All @@ -60,6 +63,7 @@
"jest": "^26.6.0",
"prettier": "^2.1.2",
"rollup": "^2.32.0",
"semantic-release": "^17.2.2",
"typescript": "^4.0.3",
"vue-class-component": "^7.2.6",
"vue-property-decorator": "^9.0.2"
Expand Down
11 changes: 11 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
extends: '@kocal/semantic-release-preset',
branches: [
'+([0-9])?(.{+([0-9]),x}).x',
'main', // Until https://github.com/semantic-release/semantic-release/issues/1581 is fixed
'next',
'next-major',
{ name: 'beta', prerelease: true },
{ name: 'alpha', prerelease: true },
],
};
Loading

0 comments on commit 7ba2d3a

Please sign in to comment.