Skip to content

Commit

Permalink
feat: add semantic releases
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen committed Jan 28, 2024
1 parent cb2276d commit 353489a
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/semantic-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: semantic-lint

on:
pull_request:
branches:
- main
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
contents: read
pull-requests: read

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: semantic
on:
push:
branches:
- main
- next

permissions:
contents: read # for checkout

jobs:
release:
name: release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: setup node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: release
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_GITHUB_TOKEN }}
run: |
npx \
-p @semantic-release/commit-analyzer \
-p @semantic-release/release-notes-generator \
-p @semantic-release/github \
semantic-release --debug
16 changes: 16 additions & 0 deletions .releaserc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
- - "@semantic-release/github"
- successComment: |
:tada: This ${issue.pull_request ? 'pull request is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:
The release is available on [GitHub release](https://github.com/ekristen/test-aws-nuke/releases/tag/${nextRelease.gitTag}) :rocket:
branches:
- name: +([0-9])?(.{+([0-9]),x}).x
- name: main
- name: next
prerelease: true
- name: pre/rc
prerelease: '${name.replace(/^pre\\//g, "")}'

0 comments on commit 353489a

Please sign in to comment.