Release 1.0.0 #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Release | |
| run-name: Release ${{ github.event.release.tag_name }} | |
| on: | |
| release: | |
| types: | |
| - published | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Test Release | |
| runs-on: [self-hosted, macOS] | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v6 | |
| with: | |
| clean: true | |
| - name: Clear SwiftPM Caches | |
| run: | | |
| rm -rf ~/.swiftpm | |
| rm -rf ~/Library/Caches/org.swift.swiftpm | |
| rm -rf ~/Library/org.swift.swiftpm | |
| rm -rf .swiftpm | |
| rm -rf .build | |
| - name: Run Tests | |
| run: swift test -v | |
| notify_package_collection: | |
| name: Notify Package Collection | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Trigger Swift Package Collection Rebuild | |
| env: | |
| COLLECTION_REPO: thatfactory/swift-package-collection | |
| WORKFLOW_FILE: publish.yml | |
| REF: main | |
| GH_TOKEN: ${{ secrets.COLLECTION_TRIGGER_TOKEN }} | |
| SOURCE_REPO: ${{ github.repository }} | |
| SOURCE_VERSION: ${{ github.event.release.tag_name }} | |
| run: | | |
| set -euo pipefail | |
| if [ -z "${GH_TOKEN:-}" ]; then | |
| echo "Missing COLLECTION_TRIGGER_TOKEN secret" | |
| exit 1 | |
| fi | |
| curl -sS -X POST \ | |
| -H "Accept: application/vnd.github+json" \ | |
| -H "Authorization: Bearer $GH_TOKEN" \ | |
| "https://api.github.com/repos/$COLLECTION_REPO/actions/workflows/$WORKFLOW_FILE/dispatches" \ | |
| -d "{\"ref\":\"$REF\",\"inputs\":{\"source_repo\":\"$SOURCE_REPO\",\"source_version\":\"$SOURCE_VERSION\"}}" |