diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1357753..e429346 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,8 @@ name: Create Release +permissions: + contents: write + on: push: tags: @@ -14,20 +17,24 @@ jobs: # Add steps to build/test your project here - - name: List bin directory - run: ls -al ./bin - - name: Run bundle script run: ./scripts/bundle_all.sh - - name: Zip ChiliKeys.app - run: zip -r Install.app.zip ./bin/Install.app + - name: Ensure Executable Permissions + run: | + chmod +x ChiliKeys.app/Contents/MacOS/* + chmod +x ChiliKeys.app/Contents/Resources/scripts/* + - name: Zip ChiliKeys.app + run: | + cd bin + zip -r ../ChiliKeys.app.zip ChiliKeys.app + - name: Read Changelog id: changelog run: | - echo "##[set-output name=body;]$(cat CHANGELOG.md)" - + echo "::set-output name=body::$(cat CHANGELOG.md)" + - name: Create Release id: create_release uses: softprops/action-gh-release@v1 diff --git a/scripts/bundle_all.sh b/scripts/bundle_all.sh index bf54220..f5b1e14 100755 --- a/scripts/bundle_all.sh +++ b/scripts/bundle_all.sh @@ -1,9 +1,12 @@ #!/bin/bash +# Navigate to the script's directory +cd "$(dirname "$0")" + # Define the source and destination directories KEY_LAYOUTS_DIR="../key_layouts" -SCRIPT_DIR="../scripts/copy_keylayouts.sh" -DEST_DIR="../bin/Install.app/Contents/Resources" +SCRIPT_DIR="copy_keylayouts.sh" +DEST_DIR="../bin/ChiliKeys.app/Contents/Resources" # Copy the files from the source to the destination cp -R "$KEY_LAYOUTS_DIR" "$DEST_DIR" diff --git a/scripts/copy_keylayouts.sh b/scripts/copy_keylayouts.sh index 1e3dcb3..15e3e69 100755 --- a/scripts/copy_keylayouts.sh +++ b/scripts/copy_keylayouts.sh @@ -1,12 +1,3 @@ -# #!/bin/bash -# # Navigate to the script's directory -# cd "$(dirname "$0")" - -# # Copy keylayouts to the user's Keyboard Layouts directory -# cp ../resources/*.keylayout ~/Library/Keyboard\ Layouts/ -# cp ../resources/*.icns ~/Library/Keyboard\ Layouts/ - - #!/bin/bash # Navigate to the script's directory cd "$(dirname "$0")"