Skip to content

test new doc generation command #23

test new doc generation command

test new doc generation command #23

Workflow file for this run

# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
name: Swift
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
repository: getargv/getargv
path: getargv
token: ${{ secrets.GH_PAT }}
- name: Build libgetargv
run: make install_dylib
working-directory: getargv
- uses: actions/checkout@v4
with:
path: getargv-swift
- name: Build
run: swift build -v
working-directory: getargv-swift
- name: Run tests
run: swift test -v
working-directory: getargv-swift
- name: Build docs
run: swift package generate-documentation
working-directory: getargv-swift
- run: ls -R getargv-swift
- run: xcodebuild -list && false
if: ${{ failure() }}
working-directory: getargv-swift
- uses: actions/upload-artifact@v3
with:
name: docs
path: getargv-swift/Docs/SwiftGetargv.doccarchive.tar.gz
if-no-files-found: error
- run: ls -R Docs && false
if: ${{ failure() }}
working-directory: getargv-swift
release:
if: ${{ github.ref_type == 'tag' }}
needs: [ build ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
path: pkg
- uses: softprops/action-gh-release@v1
with:
files: pkg/docs
name: ${{ github.ref_name }}