mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-22 20:53:19 +00:00
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@v3
|
|
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 }}
|