mirror of
https://github.com/acedanger/dotfiles.git
synced 2025-12-05 22:30:13 -08:00
52 lines
1.2 KiB
YAML
52 lines
1.2 KiB
YAML
---
|
|
name: ci
|
|
run-name: Perform release from latest tag
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
on:
|
|
push:
|
|
tags: ['*']
|
|
|
|
jobs:
|
|
release:
|
|
name: Create a GitHub release
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout main
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- run: >-
|
|
git config user.name github-actions;
|
|
git config user.email github-actions@github.com;
|
|
git config --global user.email github-actions@github.com;
|
|
git config --global user.name github-actions;
|
|
|
|
- name: Fetch latest tag
|
|
run: >-
|
|
echo "LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)"
|
|
>> "$GITHUB_ENV"
|
|
|
|
- name: SemVer release
|
|
uses: cocogitto/cocogitto-action@v3.5
|
|
id: relase
|
|
|
|
- name: Generate changelog
|
|
run: >-
|
|
cog changelog --at ${{env.LATEST_TAG }} --template
|
|
remote > GITHUB_CHANGELOG.md
|
|
|
|
- name: print
|
|
run: echo ${{ env.LATEST_TAG }}
|
|
|
|
- name: Upload github release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
body_path: GITHUB_CHANGELOG.md
|
|
tag_name: ${{ env.LATEST_TAG }}
|
|
|