re: Add mac action #2
This file contains hidden or 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: Test Build VBA (macOS) | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- mac | |
permissions: | |
id-token: write | |
attestations: write | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
- name: "Install Office" | |
run: | | |
# macOS Office installers: https://github.com/alsyundawy/Microsoft-Office-For-MacOS | |
# Download the Office installer from: https://go.microsoft.com/fwlink/?linkid=525133 | |
curl -L "https://go.microsoft.com/fwlink/?linkid=525133" -o microsoft_office_installer.pkg | |
sudo installer -pkg microsoft_office_installer.pkg -target / | |
shell: bash | |
- name: "Take exiting screenshot" | |
if: always() | |
run: | | |
mkdir -p screenshots | |
screencapture -x screenshots/$(date +%Y%m%d_%H%M%S).png | |
shell: bash | |
- name: "Upload Screenshots" | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "Screenshots" | |
path: "./screenshots/*" | |
if-no-files-found: warn |