release-zip-release #13
Workflow file for this run
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-zip-release | |
on: | |
release: # 发布 Release 后才会运行 | |
types: [published] | |
jobs: | |
build-zip: | |
name: Build and Publish Extension Zip | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout # 克隆项目 | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: Archive Release # 打包文件为 zip | |
uses: thedoctor0/zip-release@master | |
with: | |
filename: 'DGTExtra_datapack_${{ github.event.release.tag_name }}.zip' | |
path: 'data LICENSE pack.mcmeta pack.png' | |
- name: Upload Release # 发布到 Release | |
uses: ncipollo/[email protected] | |
with: | |
allowUpdates: true # 因为之前已经创建了 Release,所以要进行更新 | |
omitName: true # 更新的时候不改变 Release 的名字 | |
omitBody: true #更新時不改变 Release 描述 | |
artifacts: 'DGTExtra_datapack_${{ github.event.release.tag_name }}.zip' # 多个文件逗号分开 | |
token: ${{ secrets.GIT_TOKEN }} # https://github.com/settings/tokens 只选 repo 就行 |