Skip to content

Commit

Permalink
调试 CI 配置
Browse files Browse the repository at this point in the history
  • Loading branch information
i.xyz committed Apr 22, 2023
1 parent 6f16a48 commit 1a38abe
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,40 @@ on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
- 'V*' # Push events to matching v*, i.e. v1.0, v20.15.10
workflow_dispatch:

# 需要运行的作业组合
jobs:
# 任务:创建 release 版本
create-release:
runs-on: ubuntu-latest
outputs:
RELEASE_UPLOAD_ID: ${{ steps.create_release.outputs.id }}

steps:
- uses: actions/checkout@v2
# 查询版本号(tag)
- name: Query version number
id: get_version
shell: bash
run: |
echo "using version tag ${GITHUB_REF:10}"
echo ::set-output name=version::"${GITHUB_REF:10}"
# 根据查询到的版本号创建 release
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: '${{ steps.get_version.outputs.VERSION }}'
release_name: 'app ${{ steps.get_version.outputs.VERSION }}'
body: 'See the assets to download this version and install.'

release:
needs: create-release
permissions:
contents: write
strategy:
Expand Down

0 comments on commit 1a38abe

Please sign in to comment.