Skip to content

Commit

Permalink
ci: add automated version management
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielAraldi committed Jul 3, 2024
1 parent 48dd83d commit 804ee8e
Show file tree
Hide file tree
Showing 8 changed files with 8,429 additions and 2,144 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI - Release

on:
push:
branches: main

permissions:
contents: read

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: npm clean-install

- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures

- name: Build App
run: npm run build

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release --ci
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*.{ts,tsx}": ["npm run pretty", "npm run lint", "git add ."]
}
38 changes: 38 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"branches": ["main"],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"releaseRules": [
{ "type": "feat", "release": "minor" },
{ "type": "chore", "release": "minor" },
{ "type": "build", "release": "patch" },
{ "type": "fix", "release": "patch" },
{ "type": "perf", "release": "patch" },
{ "type": "style", "release": "patch" },
{ "type": "ci", "release": false },
{ "type": "docs", "release": false },
{ "type": "refactor", "release": false },
{ "type": "temp", "release": false },
{ "type": "test", "release": false }
]
}
],
["@semantic-release/release-notes-generator"],
[
"@semantic-release/changelog",
{
"changelogFile": "./CHANGELOG.md"
}
],
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
"@semantic-release/github",
"@semantic-release/git"
]
}
Empty file added CHANGELOG.md
Empty file.
Loading

0 comments on commit 804ee8e

Please sign in to comment.