diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..d1186cc3 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,39 @@ +name: Build for macOS ARM64 + +on: + push: + tags: ['*'] + create: + tags: ['*'] + +jobs: + build-mac-arm: + name: Build macOS ARM64 Binary + runs-on: macos-latest + if: startsWith(github.ref, 'refs/tags/') + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + + - name: Create bin directory + run: mkdir -p bin + + - name: Build for macOS ARM64 + run: | + echo "Building macOS ARM64 binary..." + GOOS=darwin GOARCH=arm64 go build -o bin/mailhog-mac-arm64 main.go + + - name: Upload Build Artifact + uses: actions/upload-artifact@v4 + with: + name: mailhog-mac-arm64 + path: bin/mailhog-mac-arm64 + retention-days: 5 + if-no-files-found: error + compression-level: 6 \ No newline at end of file