Skip to content

Commit

Permalink
chore: added zip release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalsem authored Sep 27, 2021
1 parent a50dc1d commit a2418eb
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/create-zip-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Create ZIP Release

on:
release:
types: [created, edited]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set ZIP filename
id: branch
run: |
echo ::set-output name=PROJECT_NAME::${GITHUB_REPOSITORY#*/}
echo ::set-output name=ZIP_FILE::${GITHUB_REPOSITORY#*/}_${GITHUB_REF#refs/tags/}.zip
- name: Composer Install
run: composer install --no-dev --ignore-platform-reqs

- name: Make Zip ${{ steps.branch.outputs.ZIP_FILE }}
run: |
cd ..
zip -r ${{ steps.branch.outputs.ZIP_FILE }} ${{ steps.branch.outputs.PROJECT_NAME }} -x '*/.git/*'
- name: Upload Asset
uses: ncipollo/release-action@v1
with:
artifacts: ../${{ steps.branch.outputs.ZIP_FILE }}
token: ${{ secrets.GITHUB_TOKEN }}
artifactErrorsFailBuild: true
allowUpdates: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: true

0 comments on commit a2418eb

Please sign in to comment.