parent
739aa8327e
commit
444d0c7c0f
|
|
@ -212,6 +212,12 @@ jobs:
|
|||
- name: Set release tag as date
|
||||
id: vars
|
||||
run: echo "tag=release-$(TZ='Asia/Shanghai' date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT # 包含$GITHUB_ENV 的作用域,全steps也可访问
|
||||
- name: 自定提交tag
|
||||
run: |
|
||||
git config user.name "github-actions"
|
||||
git config user.email "actions@github.com"
|
||||
git tag -a ${{ steps.vars.outputs.tag }} -m "Automated release"
|
||||
git push origin ${{ steps.vars.outputs.tag }}
|
||||
- name: 获取跨job上游job的输出变量值
|
||||
run: echo "The tag from previous job is ${{ needs.upload.outputs.tag-name }}"
|
||||
- name: Download All Artifacts
|
||||
|
|
@ -260,14 +266,14 @@ jobs:
|
|||
uses: softprops/action-gh-release@v2
|
||||
#env:
|
||||
#GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
#if: github.ref_type == 'tag'
|
||||
if: github.ref_type == 'tag'
|
||||
# body_path: ${{ github.workspace }}-CHANGELOG.txt # 加载文本的路径,用于传达此版本中的显著变化
|
||||
# repository: my_gh_org/my_gh_repo
|
||||
# token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
# name: 发布名称。默认为标签名称
|
||||
# tag_name: 标签名称。默认为github.ref_name
|
||||
#tag_name: ${{ needs.upload.outputs.tag-name }}
|
||||
tag_name: ${{ steps.vars.outputs.tag }}
|
||||
#tag_name: ${{ steps.vars.outputs.tag }}
|
||||
with:
|
||||
files: |
|
||||
*.txt
|
||||
|
|
|
|||
Loading…
Reference in New Issue