ci: Make patch releases on dependency updates #88
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- stable | |
- master | |
pull_request: | |
branches: ['**'] | |
name: Release | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
name: Release | |
permissions: | |
packages: read | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: Build | |
uses: ./.github/actions/build | |
- name: Get changelog source commit | |
uses: ./.github/actions/changelog-src | |
id: changelog-src | |
- name: Generate changelog | |
uses: ./dist/generate-changelog | |
id: changelog | |
with: | |
last-tag: ${{ steps.changelog-src.outputs.tag }} | |
stay-at-zero: true | |
minor-types: | | |
feat: Features | |
patch-types: | | |
fix: Bug Fixes | |
deps: Dependency updates | |
trivial-types: | | |
chore: Maintenance | |
ci: CI & Build | |
build: CI & Build | |
refactor: Refactors | |
docs: Documentation | |
from: ${{ steps.changelog-src.outputs.sha }} | |
- name: Get next tag | |
uses: ./dist/next-tag | |
id: next-tag | |
if: ${{ steps.changelog.outputs.should-release }} | |
with: | |
last-tag: ${{ steps.changelog-src.outputs.tag }} | |
release-type: ${{ steps.changelog.outputs.release-type }} | |
stay-at-zero: true | |
- name: Release | |
uses: ./.github/actions/release-stable | |
if: ${{ steps.changelog.outputs.should-release && github.ref == 'refs/heads/stable' }} | |
with: | |
major: ${{ steps.next-tag.outputs.major }} | |
minor: ${{ steps.next-tag.outputs.minor }} | |
patch: ${{ steps.next-tag.outputs.patch }} | |
changelog: ${{ steps.changelog.outputs.changelog }} | |
issues-closed: ${{ steps.changelog.outputs.issues-closed }} |