Skip to content

Commit

Permalink
ci: semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPietrusky committed Apr 9, 2023
1 parent 2219662 commit a391a8a
Show file tree
Hide file tree
Showing 4 changed files with 18,025 additions and 5,917 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release
on:
workflow_dispatch:
push:
branches:
- main

jobs:
release:
name: Release

runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'chore(release)')"

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

# required to use our own personal access token
# we need to use a custom PAT as other workflows
# aren't triggered using secrets.GITHUB_TOKEN
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 18

- name: Install dependencies
run: npm install

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

run: npx semantic-release
20 changes: 20 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"branches": [
"main"
],
"tagFormat": "${version}",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/git",
{
"assets": [
"package.json"
],
"message": "chore(release): ${nextRelease.version} \n\n${nextRelease.notes}"
}
],
"@semantic-release/github"
]
}
Loading

0 comments on commit a391a8a

Please sign in to comment.