Skip to content

Fixing another syntax error #74

Fixing another syntax error

Fixing another syntax error #74

Workflow file for this run

name: BubbleScan Release
on:
push:
branches:
- main
- macos_certificate
jobs:
build-windows:
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Check out the code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.12'
- name: Run BubbleScan script
shell: bash
run: ./BubbleScan.sh
- name: List files in ServerCode/dist after running BubbleScan.sh
run: ls -l ServerCode/dist || echo "ServerCode/dist not found"
- name: Verify BubbleScan exists
shell: bash
run: |
if [ -f "ServerCode/dist/BubbleScan-Windows.exe" ]; then
echo "BubbleScan found in ServerCode/dist."
else
echo "BubbleScan not found in ServerCode/dist."
exit 1
fi
- name: Zip files for release
run: |
Compress-Archive -Path ServerCode/dist/BubbleScan-Windows.exe, ServerCode/dist/static -DestinationPath ServerCode/dist/BubbleScan.zip
shell: powershell
- name: Create a new Git tag
id: create_tag
shell: powershell
run: |
$TAG = "v$(Get-Date -Format 'yyyyMMddHHmmss')-Windows"
echo "TAG=$TAG" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "::set-output name=TAG::$TAG"
git tag $TAG
git push origin $TAG
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload to GitHub Release
uses: softprops/action-gh-release@v1
with:
files: ServerCode/dist/Bubblescan.zip
tag_name: ${{ steps.create_tag.outputs.TAG }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-macos:
runs-on: macos-latest
permissions:
contents: write
steps:
- name: Check out the code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.12'
- name: Set executable permissions for BubbleScan.sh
run: chmod +x BubbleScanMac.sh
- name: Run BubbleScan script
shell: bash
run: ./BubbleScanMac.sh
- name: List files in ServerCode/dist after running BubbleScan.sh
run: ls -l ServerCode/dist || echo "ServerCode/dist not found"
- name: Verify BubbleScan exists
shell: bash
run: |
if [ -f "ServerCode/dist/BubbleScan-macOS" ]; then
echo "BubbleScan found in ServerCode/dist."
else
echo "BubbleScan not found in ServerCode/dist."
exit 1
fi
- name: Codesign executable
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
IDENTITY_ID: ${{ secrets.IDENTITY_ID }}
run: |
echo $MACOS_CERTIFICATE | base64 —-decode > certificate.p12
security create-keychain -p keychain-password build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p keychain-password> build.keychain
security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k keychain-password build.keychain
/usr/bin/codesign --force -s $IDENTITY_ID ServerCode/dist/BubbleScan-MacOS -v
- name: Zip files for release
shell: bash
run: |
zip -r ServerCode/dist/BubbleScan.zip ServerCode/dist/BubbleScan-macOS ServerCode/dist/static
- name: Create a new Git tag for macOS
id: create_tag
shell: bash
run: |
TAG="v$(date +'%Y%m%d%H%M%S')-macOS"
echo "TAG=$TAG" >> $GITHUB_ENV
echo "::set-output name=TAG::$TAG"
git tag $TAG
git push origin $TAG
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload macOS binary to GitHub Release
uses: softprops/action-gh-release@v1
with:
files: ServerCode/dist/BubbleScan.zip
tag_name: ${{ steps.create_tag.outputs.TAG }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}