Skip to content

Commit

Permalink
Merge pull request #25 from pimoroni/ci/zip-file
Browse files Browse the repository at this point in the history
CI: Build zip file.
  • Loading branch information
Gadgetoid authored Aug 19, 2022
2 parents cede12d + 7156beb commit fce5898
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
49 changes: 49 additions & 0 deletions .github/workflows/release-zip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build Zip

on:
push:
pull_request:
release:
types: [created]

jobs:
build:
name: Build Zip
runs-on: ubuntu-20.04

env:
RELEASE_FILE: enviro

steps:
- uses: actions/checkout@v2
with:
path: enviro
submodules: true

- name: Prepare repository
shell: bash
run: |
rm -rf enviro/.git*
rm -rf enviro/phew/.git*
- uses: vimtor/action-zip@v1
with:
files: enviro/
dest: ${{env.RELEASE_FILE}}.zip

- name: Store .zip as artifact
uses: actions/upload-artifact@v2
with:
name: ${{env.RELEASE_FILE}}
path: enviro/

- name: Upload .zip
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
asset_path: ${{env.RELEASE_FILE}}.zip
upload_url: ${{github.event.release.upload_url}}
asset_name: ${{env.RELEASE_FILE}}.zip
asset_content_type: application/octet-stream
2 changes: 1 addition & 1 deletion phew

0 comments on commit fce5898

Please sign in to comment.