Skip to content

Commit

Permalink
build: set up releases
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshTheWanderer committed Sep 18, 2024
1 parent 84d2ff3 commit 97bf9ec
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Always validate the PR title AND all the commits
titleAndCommits: true
# Allows use of Merge commits (eg on github: "Merge branch 'main' into feature/ride-unicorns")
# this is only relevant when using commitsOnly: true (or titleAndCommits: true)
allowMergeCommits: true
# Allow use of Revert commits (eg on github: "Revert "feat: ride unicorns"")
# this is only relevant when using commitsOnly: true (or titleAndCommits: true)
allowRevertCommits: true
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: 🚀 Publish
on:
push:
branches:
- main
env:
HUSKY: 0
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: npm ci
- run: npm audit signatures
- run: npm run build
- run: npm run release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

29 changes: 29 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = {
branches: ['main'],
plugins: [
[
'@semantic-release/commit-analyzer',
{
preset: 'conventionalcommits',
presetConfig: {},
},
],
[
'@semantic-release/release-notes-generator',
{
preset: 'conventionalcommits',
},
],
'@semantic-release/changelog',
[
'@semantic-release/npm',
{
npmPublish: true,
},
],
'@semantic-release/github',

// NOTE: this plugin must be last to ensure all updated files are committed
'@semantic-release/git',
],
};

0 comments on commit 97bf9ec

Please sign in to comment.