Skip to content

Commit

Permalink
Add workflow to generate a zip file - Pull request #43
Browse files Browse the repository at this point in the history
Adds a workflow that automatically generates a ocmod.zip file
when creating a release.
  • Loading branch information
sinukaarel authored Jun 17, 2020
2 parents d972326 + 458b1b4 commit c84e2f5
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Create a ZIP version 2.2.x

on:
release:
types: [published]

jobs:
compress:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: 2.2.x

- name: Get plugin version from tag
id: version
run: echo ::set-output name=version::${GITHUB_REF#refs/*/} # Gets tag name from release.

- name: Compress ZIP
uses: TheDoctor0/[email protected]
with:
filename: release.zip
exclusions: "*.git* /*.sandbox/* /*assets/* upload/modman docker-compose.yaml Dockerfile"

- name: Get release
id: get_release_url
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload release asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release_url.outputs.upload_url }}
asset_path: ./release.zip
asset_name: smailyforopencart-${{ steps.version.outputs.version }}.ocmod.zip
asset_content_type: application/zip

0 comments on commit c84e2f5

Please sign in to comment.