Skip to content

Commit

Permalink
Merge pull request #2 from oleast/feat/publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
oleast authored Dec 14, 2022
2 parents c8ade12 + 651a2f2 commit ffb61d9
Show file tree
Hide file tree
Showing 10 changed files with 11,001 additions and 699 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Pull Request

on: pull_request

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"
cache-dependency-path: "**/package-lock.json"

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Compile
run: npm run build
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Create Semantic Release

on:
push:
branches:
- main
workflow_dispatch:

# Make sure only one deployment can happen at a time
# To make sure Semantic Release does not run concurrently and select the same version
concurrency: release

jobs:
automatic-release:
name: Semantic Release
runs-on: ubuntu-latest
outputs:
release_version: ${{ steps.semantic-release.outputs.release-version }}
steps:
- uses: actions/checkout@v3

- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"
cache-dependency-path: "**/package-lock.json"

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- uses: codfish/semantic-release-action@v2
id: semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules
local_fixtures
local_fixtures
out
dist
22 changes: 22 additions & 0 deletions .releaserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
branches: ["main"],
plugins: [
[
"@semantic-release/commit-analyzer",
{
preset: "conventionalcommits",
},
],
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
[
"@semantic-release/git",
{
assets: ["package.json, package-lock.json"],
message:
"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
},
],
"@semantic-release/github",
],
};
Loading

0 comments on commit ffb61d9

Please sign in to comment.