syntax #14
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: macOS Workflow Example | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-and-test: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Create Swift File | |
| run: | | |
| echo 'print("Hello from Swift on macOS")' > hello.swift | |
| - name: Install dependencies | |
| run: | | |
| brew install swiftlint | |
| - name: Run SwiftLint | |
| run: swiftlint | |
| - name: Compile and run Swift program | |
| run: | | |
| swiftc hello.swift | |
| ./hello |