mirror of
https://github.com/gookit/cache.git
synced 2026-04-22 15:37:07 +08:00
45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
name: Tag-release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
|
|
jobs:
|
|
release:
|
|
name: Release new version
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
strategy:
|
|
fail-fast: true
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup ENV
|
|
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
|
|
run: |
|
|
echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV
|
|
echo "RELEASE_NAME=$GITHUB_WORKFLOW" >> $GITHUB_ENV
|
|
|
|
- name: Generate changelog
|
|
run: |
|
|
curl https://github.com/gookit/gitw/releases/latest/download/chlog-linux-amd64 -L -o /usr/local/bin/chlog
|
|
chmod a+x /usr/local/bin/chlog
|
|
chlog -c .github/changelog.yml -o changelog.md prev last
|
|
|
|
# https://github.com/softprops/action-gh-release
|
|
- name: Create release and upload assets
|
|
uses: softprops/action-gh-release@v3
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
name: ${{ env.RELEASE_TAG }}
|
|
tag_name: ${{ env.RELEASE_TAG }}
|
|
body_path: changelog.md
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
# files: macos-chlog.exe
|