Skip to content

Commit

Permalink
package models
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Dec 20, 2020
1 parent fae8159 commit 8ac9753
Showing 1 changed file with 5 additions and 31 deletions.
36 changes: 5 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,6 @@ jobs:
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

models:
needs: [setup]
runs-on: ubuntu-latest
env:
PACKAGENAME: ${{ needs.setup.outputs.APPNAME }}-${{ needs.setup.outputs.VERSION }}-models
steps:
- uses: actions/checkout@v2
- name: package
run: |
rm -rf .git src
rm -f /tmp/${{ env.PACKAGENAME }}.zip
zip -9 -r /tmp/${{ env.PACKAGENAME }}.zip .
- name: upload
uses: actions/upload-artifact@v2
with:
name: ${{ env.PACKAGENAME }}
path: /tmp/${{ env.PACKAGENAME }}.zip

ubuntu:
needs: [setup]
runs-on: ubuntu-16.04
Expand Down Expand Up @@ -73,8 +55,9 @@ jobs:
run: |
mkdir -p ${{ env.PACKAGENAME }}
cp README.md LICENSE ${{ env.PACKAGENAME }}
cp -r build/${{ needs.setup.outputs.APPNAME }} ${{ env.PACKAGENAME }}
cp build/${{ needs.setup.outputs.APPNAME }} ${{ env.PACKAGENAME }}
strip -g ${{ env.PACKAGENAME }}/${{ needs.setup.outputs.APPNAME }}
cp -r models/* ${{ env.PACKAGENAME }}
zip -9 -r ${{ env.PACKAGENAME }}.zip ${{ env.PACKAGENAME }}
- name: upload
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -198,6 +181,7 @@ jobs:
cp README.md LICENSE ${{ env.PACKAGENAME }}
lipo -create build-x86_64/${{ needs.setup.outputs.APPNAME }} build-arm64/${{ needs.setup.outputs.APPNAME }} -o ${{ env.PACKAGENAME }}/${{ needs.setup.outputs.APPNAME }}
strip ${{ env.PACKAGENAME }}/${{ needs.setup.outputs.APPNAME }}
cp -r models/* ${{ env.PACKAGENAME }}
zip -9 -r ${{ env.PACKAGENAME }}.zip ${{ env.PACKAGENAME }}
- name: upload
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -239,6 +223,7 @@ jobs:
Copy-Item -Verbose -Path "LICENSE" -Destination "${{ env.PACKAGENAME }}"
Copy-Item -Verbose -Path "build\Release\${{ needs.setup.outputs.APPNAME }}.exe" -Destination "${{ env.PACKAGENAME }}"
Copy-Item -Verbose -Path "C:\windows\system32\vcomp140.dll" -Destination "${{ env.PACKAGENAME }}"
Copy-Item -Verbose -Recurse -Path "models\*" -Destination "${{ env.PACKAGENAME }}"
7z a -r ${{ env.PACKAGENAME }}.zip ${{ env.PACKAGENAME }}
- name: upload
uses: actions/upload-artifact@v2
Expand All @@ -247,7 +232,7 @@ jobs:
path: ${{ env.PACKAGENAME }}.zip

release:
needs: [setup, models, ubuntu, macos, windows]
needs: [setup, ubuntu, macos, windows]
runs-on: ubuntu-latest
steps:
- name: download
Expand All @@ -266,17 +251,6 @@ jobs:
draft: false
prerelease: false

- name: upload-models
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGENAME: ${{ needs.setup.outputs.APPNAME }}-${{ needs.setup.outputs.VERSION }}-models
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/${{ env.PACKAGENAME }}/${{ env.PACKAGENAME }}.zip
asset_name: ${{ env.PACKAGENAME }}.zip
asset_content_type: application/zip

- name: upload-ubuntu
uses: actions/upload-release-asset@v1
env:
Expand Down

0 comments on commit 8ac9753

Please sign in to comment.