Skip to content

Instantly share code, notes, and snippets.

@Clumsy-Coder
Last active March 5, 2023 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Clumsy-Coder/519aa8eab591286f9cceee2bfd076a10 to your computer and use it in GitHub Desktop.
Save Clumsy-Coder/519aa8eab591286f9cceee2bfd076a10 to your computer and use it in GitHub Desktop.
semantic release config file
name: Semantic release
on:
push:
branches:
- master
env:
FORCE_COLOR: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: install semantic-release npm packages
run: |
npm install \
conventional-changelog \
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
with:
branches: |
[ "master" ]
extra_plugins: |
@semantic-release/commit-analyzer
@semantic-release/release-notes-generator
@semantic-release/changelog
@semantic-release/github
@semantic-release/git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
module.exports = {
branches: ['master'],
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
'@semantic-release/changelog',
[
'@google/semantic-release-replace-plugin',
{
replacements: [
{
files: ['package.json'],
from: '"version": ".*"',
to: '"version": "${nextRelease.version}"',
},
],
},
],
[
'@semantic-release/github',
{
assets: [
{
path: 'android/app/build/outputs/apk/release/app-release.apk',
label: 'Android APK',
},
],
},
],
[
'@semantic-release/git',
{
assets: ['CHANGELOG.md', 'package.json'],
},
],
],
analyzeCommits: {
releaseRules: [
{
type: 'docs',
scope: 'readme.md',
release: 'patch',
},
{
type: 'build',
release: 'patch',
},
],
},
preset: 'conventionalcommits',
presetConfig: {
types: [
{
type: 'feat',
section: 'Features',
},
{
type: 'feature',
section: 'Features',
},
{
type: 'fix',
section: 'Bug Fixes',
},
{
type: 'perf',
section: 'Performance Improvements',
},
{
type: 'revert',
section: 'Reverts',
},
{
type: 'docs',
section: 'Documentation',
},
{
type: 'style',
section: 'Styles',
},
{
type: 'chore',
section: 'Miscellaneous Chores',
},
{
type: 'refactor',
section: 'Code Refactoring',
},
{
type: 'test',
section: 'Tests',
},
{
type: 'build',
section: 'Build System',
},
{
type: 'ci',
section: 'Continuous Integration',
},
],
},
tagFormat: '${version}',
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment