mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-14 00:47:14 +00:00
b7a479392e
Automatically detect breaking changes based on commit messages and bump the alpha release number accordingly. E.g. v0.23.1-alpha.1 will be bumped to v0.24.0-alpha.0 if any commit since v0.23.0 has a breaking change.
66 lines
1.6 KiB
YAML
66 lines
1.6 KiB
YAML
name: Continuous Deployment
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
# At 00:00 on Saturday
|
|
# https://crontab.guru/#0_0_*_*_6
|
|
- cron: "0 0 * * 6"
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
publish-alpha:
|
|
name: Create an alpha release
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
if: ${{ !startsWith(github.event.ref, 'refs/tags/v') }}
|
|
steps:
|
|
- name: Checkout the repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Calculate the next release
|
|
run: .github/workflows/calculate-alpha-release.bash
|
|
|
|
- name: Publish on crates.io
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: publish
|
|
args: --allow-dirty --token ${{ secrets.CARGO_TOKEN }}
|
|
|
|
- name: Generate a changelog
|
|
uses: orhun/git-cliff-action@v2
|
|
with:
|
|
config: cliff.toml
|
|
args: --unreleased --tag ${{ env.NEXT_TAG }} --strip header
|
|
env:
|
|
OUTPUT: BODY.md
|
|
|
|
- name: Publish on GitHub
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
tag: ${{ env.NEXT_TAG }}
|
|
prerelease: true
|
|
bodyFile: BODY.md
|
|
|
|
publish-stable:
|
|
name: Create a stable release
|
|
runs-on: ubuntu-latest
|
|
if: ${{ startsWith(github.event.ref, 'refs/tags/v') }}
|
|
steps:
|
|
- name: Checkout the repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Publish on crates.io
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: publish
|
|
args: --token ${{ secrets.CARGO_TOKEN }}
|