Skip to content

Commit

Permalink
Try fix the release GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
zoetrope69 committed Aug 14, 2020
1 parent 67004e6 commit a43209a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/release_zip.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: Release .zip file
name: Release with a release.zip file
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
release_zip:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Copy .package files from src/ into temporary build/ folder
- name: Copy .package files from src/ into temporary release/ folder
run: |
mkdir build
find src/ -name '*.package' -exec cp -prv '{}' 'build/' ';'
mkdir release
find src -name '*.package' -exec cp -prv '{}' release ';'
- name: Zip the build
run: zip --junk-paths release build/
- name: Create Release
- name: Zip release/ into release.zip
run: zip release release/*.package

- name: Create release
id: create_release
uses: actions/create-release@v1
env:
Expand All @@ -28,14 +28,15 @@ jobs:
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset

- name: Upload release.zip asset to the release
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# This pulls from the CREATE RELEASE step above
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release.zip
asset_name: release.zip
asset_content_type: application/zip
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
build/
release/
release.zip

0 comments on commit a43209a

Please sign in to comment.