Skip to content

Commit

Permalink
Simplify our build release zip action to match what Distributor does …
Browse files Browse the repository at this point in the history
…to see if this fixes problems with zips not attaching to a release. Note this does mean you can't manually trigger a zip anymore but we can add that back if this works
  • Loading branch information
dkotter committed Jul 18, 2023
1 parent 8371f26 commit b8d8d2c
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions .github/workflows/build-release-zip.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Build release zip

on:
workflow_dispatch:
release:
types: [published]

Expand All @@ -14,34 +13,16 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x

- name: npm install and build
- name: Create ZIP
run: |
npm install
npm run build
npm run makepot
composer install --no-dev
npm run archive
- name: Upload the ZIP file as an artifact
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}
path: release
retention-days: 5
git archive --prefix=classifai/ HEAD -o classifai.zip
- name: Upload release asset
if: ${{ github.event_name == 'release' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{github.workspace}}/${{ github.event.repository.name }}.zip
asset_name: ${{ github.event.repository.name }}.zip
asset_path: ${{github.workspace}}/classifai.zip
asset_name: classifai.zip
asset_content_type: application/zip

0 comments on commit b8d8d2c

Please sign in to comment.