2023-09-21 Purple hats (Portable Setup) #123
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push installation image | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
windows-install-purple: | |
runs-on: windows-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
with: | |
path: purple-hats | |
- name: Copy scripts to parent directory | |
run: | | |
cp ${{github.workspace}}/purple-hats/scripts/*.ps1 ${{github.workspace}} | |
cp ${{github.workspace}}/purple-hats/scripts/*.cmd ${{github.workspace}} | |
cp ${{github.workspace}}/purple-hats/scripts/*.xml ${{github.workspace}} | |
- name: Install Purple dependencies for Windows | |
shell: pwsh | |
run: powershell.exe -NoProfile -ExecutionPolicy Bypass "& ${{github.workspace}}\install_purple_dependencies.ps1" | |
working-directory: ${{github.workspace}} | |
- name: Zip entire Purple folder (Windows) | |
shell: pwsh | |
run: Compress-Archive -Path ${{github.workspace}}/* -DestinationPath purple-hats-portable-windows.zip | |
- name: Upload Windows artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: purple-hats-portable-windows | |
path: ./purple-hats-portable-windows.zip | |
- name: Release Windows artifact | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
purple-hats-portable-windows.zip | |
mac-install-purple: | |
runs-on: macos-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
with: | |
path: purple-hats | |
- name: Grant execute permissions for user | |
run: chmod ugo+rwx ./scripts/*.command ./scripts/*.sh | |
working-directory: purple-hats | |
- name: Copy scripts to parent directory | |
run: | | |
cp ./purple-hats/scripts/{*.command,*.sh,*.xml} ${{ github.workspace }} | |
- name: Install Purple dependencies for MacOS | |
run: | | |
./install_purple_dependencies.command | |
- name: Zip entire Purple folder (Mac) | |
run: | | |
zip purple-hats-portable-mac.zip -y -r ./ | |
- name: Upload Mac artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: purple-hats-portable-mac | |
path: ./purple-hats-portable-mac.zip | |
- name: Release Mac artifact | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
purple-hats-portable-mac.zip |