Skip to content
This repository has been archived by the owner on Dec 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #111 from kaimallea/semantic-release
Browse files Browse the repository at this point in the history
Use semantic-release in CI
  • Loading branch information
kaimallea authored Mar 11, 2021
2 parents 1b0285b + 45a696e commit d016c4e
Show file tree
Hide file tree
Showing 7 changed files with 17,769 additions and 6,290 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/preview-semantic-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Preview semantic-release

on:
pull_request:
branches: ['*']

jobs:
preview-semantic-release:
name: Preview semantic-release
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js 15.x
uses: actions/setup-node@v2
with:
node-version: 15
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build --if-present
- name: Preview semantic-release
run: npx @kai/show-next-version@next
33 changes: 33 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release

on:
push:
branches: [$default-branch, next, alpha, beta]

jobs:
release:
name: Release
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build --if-present
- name: Run linters
run: npm run lint
- name: Run tests
run: npm test
- name: Release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
18 changes: 11 additions & 7 deletions .github/workflows/test.yml → .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Tests

on:
push:
branches: [$default-branch]
pull_request:
branches: ['*']

Expand All @@ -16,13 +14,19 @@ jobs:
node-version: [12.x, 14.x, 15.x]

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build --if-present
- name: Run linters
run: npm run lint
- name: Run tests
run: npm test
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
package-lock.json
.github
8 changes: 8 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"branches": [
{ "name": "main" },
{ "name": "next", "channel": "next" },
{ "name": "beta", "prerelease": true },
{ "name": "alpha", "prerelease": true }
]
}
Loading

0 comments on commit d016c4e

Please sign in to comment.