Skip to content

Enabling spellcheck GitHub Action (#3) #30

Enabling spellcheck GitHub Action (#3)

Enabling spellcheck GitHub Action (#3) #30

Workflow file for this run

name: CI/CD
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# schedule:
# - cron: '0 0 * * *'
workflow_dispatch:
inputs:
release:
description: Create release
required: false
type: boolean
version:
description: New version to release
required: false
type: string
concurrency:
group: ci/cd-${{ github.ref }}
cancel-in-progress: true
jobs:
# analyze:
# name: Analyze
# if: github.event_name != 'workflow_dispatch'
# uses: SwiftyLab/ci/.github/workflows/codeql-analysis.yml@main
# permissions:
# actions: read
# contents: read
# security-events: write
spell-check:
name: Run spell check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Spellcheck Action
uses: rojopolis/spellcheck-github-actions@0.35.0
with:
config_path: .github/config/spellcheck.yml
swift-package-test:
name: Swift Package
uses: SwiftyLab/ci/.github/workflows/swift-package.yml@main
secrets: inherit
with:
matrix: >
{
"include": [
{
"os": "ubuntu-latest",
"swift": "5.7"
},
{
"os": "ubuntu-20.04",
"swift": "5.2"
}
]
}
# {
# "os": "macos-12",
# "xcode": "latest-stable",
# "swift": "5.6"
# },
# {
# "os": "windows-latest",
# "swift": "5.6"
# },
# {
# "os": "windows-latest",
# "swift": "5.3"
# }
cocoapods-test:
name: CocoaPods
uses: SwiftyLab/ci/.github/workflows/cocoapods.yml@main
strategy:
matrix:
platforms: ['macos tvos', 'ios']
with:
platforms: ${{ matrix.platforms }}
xcode-test:
name: Xcode
uses: SwiftyLab/ci/.github/workflows/xcode.yml@main
with:
os: macos-11
xcode: '11.7'
ci:
name: CI
if: github.event_name == 'push'
needs: [swift-package-test, xcode-test, cocoapods-test, spell-check]
# needs: [analyze, swift-package-test, xcode-test, cocoapods-test]
uses: SwiftyLab/ci/.github/workflows/ci.yml@main
cd:
name: CD
if: |
(github.event_name == 'push' && needs.ci.outputs.release == 'true') ||
(always() &&
github.event_name == 'workflow_dispatch' &&
github.event.inputs.release == 'true' &&
needs.swift-package-test.result == 'success' &&
needs.xcode-test.result == 'success' &&
needs.cocoapods-test.result == 'success' &&
(needs.ci.result == 'success' || needs.ci.result == 'skipped'))
# (needs.analyze.result == 'success' || needs.analyze.result == 'skipped')
needs: [ci, swift-package-test, xcode-test, cocoapods-test, spell-check]
# needs: [ci, analyze, swift-package-test, xcode-test, cocoapods-test]
uses: SwiftyLab/ci/.github/workflows/cd.yml@main
with:
os: macos-12
version: ${{ github.event.inputs.version }}
secrets:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}