Skip to content

Instantly share code, notes, and snippets.

@artu-hnrq
Created May 2, 2021 14:42
Show Gist options
  • Save artu-hnrq/cae70092196af8363e0f555158374bfc to your computer and use it in GitHub Desktop.
Save artu-hnrq/cae70092196af8363e0f555158374bfc to your computer and use it in GitHub Desktop.
Simple semantic-release Github Action config
branches: release
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
- [
"@semantic-release/changelog",
changelogTitle: "# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)."
]
- ["@semantic-release/git", assets: CHANGELOG.md]
- "@semantic-release/github"
preset: conventionalcommits
name: Release
on:
push:
branches:
- release
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14
- name: Install plugins
run: |
npm install conventional-changelog-conventionalcommits
npm install @semantic-release/commit-analyzer -D
npm install @semantic-release/release-notes-generator -D
npm install @semantic-release/changelog -D
npm install @semantic-release/git -D
npm install @semantic-release/github -D
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mv .github/workflows/.releaserc .
npx semantic-release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment