Skip to content

Commit

Permalink
add unitypackage
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonic853 committed Aug 16, 2024
1 parent 1918a45 commit ce4385e
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Checkout repository to Packages
uses: actions/checkout@v4
with:
path: Packages

- name: Set up Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -46,7 +51,16 @@ jobs:
- name: Create ZIP archive
if: steps.read_version.outputs.last_tag != steps.read_version.outputs.current_version
run: |
zip -r ${{ steps.read_version.outputs.name }}-${{ steps.read_version.outputs.current_version }}.zip . -x ".git*" ".github*"
zip -r ${{ steps.read_version.outputs.name }}-${{ steps.read_version.outputs.current_version }}.zip . -x ".git*" ".github*" "Packages*"
- name: Track Package Meta Files
run: find "Packages/" -name \*.meta >> metaList

- name: Create UnityPackage
uses: pCYSl5EDgo/create-unitypackage@master
with:
package-path: ${{ steps.read_version.outputs.name }}-${{ steps.read_version.outputs.current_version }}.unitypackage
include-files: metaList

- name: Release
if: steps.read_version.outputs.last_tag != steps.read_version.outputs.current_version
Expand Down Expand Up @@ -83,7 +97,9 @@ jobs:
如需获得使用此储存库以及商品的授权,请联系作者 Sonic853 ([email protected]) 获取授权或访问 [爱发电](https://afdian.com/a/Sonic853) 手动获取授权。
tag_name: ${{ steps.read_version.outputs.current_version }}
files: ${{ steps.read_version.outputs.name }}-${{ steps.read_version.outputs.current_version }}.zip
files: |
${{ steps.read_version.outputs.name }}-${{ steps.read_version.outputs.current_version }}.zip
${{ steps.read_version.outputs.name }}-${{ steps.read_version.outputs.current_version }}.unitypackage
- name: Dispatch version to vpm-repos
if: steps.read_version.outputs.last_tag != steps.read_version.outputs.current_version
Expand All @@ -92,4 +108,4 @@ jobs:
token: ${{ secrets.PAT }}
repository: Sonic853/vpm-repos
event-type: publish-vpm
client-payload: '{"repository": "${{ github.repository }}", "path": "${{ github.event.repository.name }}", "name": "${{ steps.read_version.outputs.name }}", "version": "${{ steps.read_version.outputs.current_version }}"}'
client-payload: '{"repository": "${{ github.repository }}", "path": "${{ github.event.repository.name }}", "name": "${{ steps.read_version.outputs.name }}", "version": "${{ steps.read_version.outputs.current_version }}"}'

0 comments on commit ce4385e

Please sign in to comment.