给代码块增加语言标识. #5
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
name: Release Typora Theme | |
on: | |
push: | |
branches: | |
- main # 选择触发的分支 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Get current tag version | |
id: tag | |
run: | | |
TAG=$(git describe --tags --abbrev=0 || echo "v1.0.0") | |
echo "Current tag: ${TAG}" | |
echo "::set-output name=current_tag::${TAG}" | |
- name: Create zip file with tag name | |
run: | | |
TAG=${{ steps.tag.outputs.current_tag }} | |
zip -r typora-theme-${TAG}.zip . -x ".*" "*/.*" | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: typora-theme-${{ steps.tag.outputs.current_tag }}.zip | |
tag_name: ${{ steps.tag.outputs.current_tag }} | |
name: ${{ steps.tag.outputs.current_tag }} | |
body: | | |
版本更新:${{ steps.tag.outputs.current_tag }} | |
更新内容: ${{ github.event.head_commit.message }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |