GitHub Action for Swift

This action executes Swift and generates github action annotations from swift warnings/errors.

Usage

An example to executing Swift follows:

name: Swift

on:
  push:
    paths:
      - '.github/workflows/swift.yml' # File path to this yaml
      - '**/*.swift'
  pull_request:
    paths:
      - '.github/workflows/swift.yml' # File path to this yaml
      - '**/*.swift'

jobs:
  swift-on-docker:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]
      - uses: sinoru/[email protected]
        with:
          swift-image-tag: 'latest'
          args: 'build'
      - uses: sinoru/[email protected]
        with:
          swift-image-tag: 'latest'
          args: 'test'

  swift-without-docker:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]
      - uses: sinoru/[email protected]
        with:
          swift-version: '5.6.3'
          args: 'build'
      - uses: sinoru/[email protected]
        with:
          args: 'test'

GitHub

View Github