diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index c45dd6e4..c2639bd8 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -23,10 +23,19 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Build Artifact + - name: Build Release Artifact run: swift run build-swiftly-release ${{ inputs.skip }} ${{ inputs.version }} - - name: Upload Artifact + - name: Upload Release Artifact uses: actions/upload-artifact@v4 with: + name: swiftly-release-x86_64 path: .build/release/swiftly-*.tar.gz if-no-files-found: error + - name: Build Documentation Artifacts + run: swift package --allow-writing-to-directory .build/docs generate-documentation --target SwiftlyDocs --output-path .build/docs + - name: Upload Documentation Artifacts + uses: actions/upload-artifact@v4 + with: + name: swiftly-docs + path: .build/docs/** + if-no-files-found: error diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index b1554a2c..631636d9 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -43,6 +43,7 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v4 with: + name: swiftly-release-x86_64 path: .build/release/swiftly-*.tar.gz if-no-files-found: error retention-days: 1 @@ -57,3 +58,25 @@ jobs: linux_pre_build_command: ./scripts/prep-gh-action.sh linux_build_command: swift run swiftformat --lint --dryrun . enable_windows_checks: false + + docscheck: + name: Documentation Check + runs-on: ubuntu-latest + container: + image: "swift:6.0-noble" + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Prepare the action + run: ./scripts/prep-gh-action.sh && ./scripts/install-libarchive.sh + - name: Generate Swiftly CLI Reference and Check for Differences + run: swift package plugin --allow-writing-to-package-directory generate-docs-reference && git config --global --add safe.directory $(pwd) && git diff --exit-code Documentation/SwiftlyDocs.docc/swiftly-cli-reference.md || (echo "The documentation hasn't been updated with the latest swiftly command-line reference. Please run 'swift package plugin generate-docs-reference' and commit/push the changes."; exit 1) + - name: Generate Documentation Set + run: swift package --allow-writing-to-directory .build/docs generate-documentation --target SwiftlyDocs --output-path .build/docs + - name: Upload Documentation Artifacts + uses: actions/upload-artifact@v4 + with: + name: swiftly-docs + path: .build/docs/** + if-no-files-found: error + retention-days: 1