File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : macOS Workflow Example
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ build-and-test :
10+ runs-on : macos-latest
11+
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v3
15+
16+ - name : Create Swift File
17+ run : |
18+ echo 'print("Hello from Swift on macOS")' > hello.swift
19+
20+ - name : Install dependencies
21+ run : |
22+ brew install swiftlint
23+
24+ - name : Run SwiftLint
25+ run : swiftlint
26+
27+ - name : Compile and run Swift program
28+ run : |
29+ swiftc hello.swift
30+ ./hello
Original file line number Diff line number Diff line change 1+ # If you don't create a self-hosted runner you will see:
2+ # Waiting for a runner to pick up this job...
3+ name : Self-hosted Runner Workflow
4+
5+ on :
6+ push :
7+ branches :
8+ - main
9+
10+ jobs :
11+ example-job :
12+ runs-on : self-hosted
13+ steps :
14+ - name : Check out repository
15+ uses : actions/checkout@v3
16+ - name : Run a one-line script
17+ run : echo "Hello from a self-hosted runner!"
Original file line number Diff line number Diff line change 1+ name : Windows Workflow Example
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ build-and-test :
13+ runs-on : windows-latest
14+
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v3
18+
19+ - name : Install dependencies
20+ run : choco install dotnetcore-sdk
21+ shell : powershell
22+
23+ - name : Compile and run C# program
24+ run : |
25+ Add-Content -Path "Hello.cs" -Value @"
26+ using System;
27+ public class Hello
28+ {
29+ public static void Main()
30+ {
31+ Console.WriteLine("Hello, Windows from C#");
32+ }
33+ }
34+ "@
35+ dotnet new console --force --no-restore
36+ Move-Item -Path "Hello.cs" -Destination "Program.cs" -Force
37+ dotnet run
38+ shell : powershell
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments