Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejsevcik authored Jul 23, 2024
0 parents commit 8e19927
Show file tree
Hide file tree
Showing 19 changed files with 10,957 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: 'daily'
open-pull-requests-limit: 10
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'monthly'
open-pull-requests-limit: 10
60 changes: 60 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: PR Checks
on: pull_request

jobs:
pr-checks-build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"
- name: Install Dependencies
run: npm ci
- name: Build Package
run: npm run build
pr-checks-code-lint:
name: Code Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"
- name: Install Dependencies
run: npm ci
- name: Run Code Linting
run: npm run lint
pr-checks-tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"
- name: Install Dependencies
run: npm ci
- name: Run Tests
run: npm run test

automerge:
needs: pr-checks-tests
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- uses: fastify/github-action-merge-dependabot@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Pre-release
on:
push:
branches:
- beta
- "exp-*"

jobs:
pre-release:
name: pre-release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: "https://registry.npmjs.org" # This registry URL is necessary for publishing on NPM
cache: "npm"
- name: Install Dependencies
run: npm ci
- name: Build Package
run: npm run build
- name: Pre-Release Package
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # should be set in Github repo, need this to publish on NPM
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by Github Actions, need this to create a GitHub Release
run: |
npx semantic-release
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release
on:
push:
branches:
- main

jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4 # This action checks-out your repository under $GITHUB_WORKSPACE, so your workflow can access it.
with:
ref: main
fetch-depth: 0
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: "https://registry.npmjs.org" # This registry URL is necessary for publishing on NPM
- name: Install Dependencies
run: npm ci
- name: Build Package
run: npm run build
- name: Release Package
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # should be set in Github repo, need this to publish on NPM
GITHUB_TOKEN: ${{ secrets.PLATFORM_READ_PRIVATE_REPOS }} # automatically provided by Github Actions, need this to create a GitHub Release
run: |
npx semantic-release
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
.eslintcache
.idea
101 changes: 101 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"branches": [
"main",
{
"name": "beta",
"prerelease": true
},
{
"name": "exp-*",
"prerelease": true
}
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"parserOpts": {
"noteKeywords": [
"BREAKING CHANGE",
"BREAKING CHANGES"
]
},
"releaseRules": [
{
"type": "chore",
"release": false
},
{
"type": "refactor",
"release": "patch"
}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"parserOpts": {
"noteKeywords": [
"BREAKING CHANGE",
"BREAKING CHANGES"
]
},
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features",
"hidden": false
},
{
"type": "fix",
"section": "Bug Fixes",
"hidden": false
},
{
"type": "revert",
"section": "Reverts",
"hidden": false
},
{
"type": "refactor",
"section": "Code Refactors",
"hidden": false
},
{
"type": "chore",
"hidden": true
}
]
}
}
],
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md"
}
],
[
"@semantic-release/npm",
{
"npmPublish": true
}
],
[
"@semantic-release/git",
{
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
"assets": [
"CHANGELOG.md",
"package.json",
"package-lock.json"
]
}
],
"@semantic-release/github"
]
}
2 changes: 2 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# These owners will be the default owners for everything in the repo.
* @lokalise/frontend-foundations
Loading

0 comments on commit 8e19927

Please sign in to comment.