diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 62e5fdb..75921a3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,35 +1,28 @@ -on: +on: release: - types: [created] - + types: [published, edited] name: Upload Artifact Bundle to Release -env: - DEVELOPER_DIR: "/Applications/Xcode_16.0.app/Contents/Developer" - SWIFT_TESTING_REVOLUTIONARY_DEVELOPMENT: 1 - +env: + DEVELOPER_DIR: '/Applications/Xcode_16.2.app/Contents/Developer' jobs: release: - name: Build and Upload Artifact Bundle - runs-on: macos-14 + runs-on: macos-15 steps: - - uses: actions/checkout@v3 - - name: Resolve Dependencies - run: | - swift package resolve - - name: Build Binary - run: | - swift build --disable-sandbox -c release --arch arm64 --arch x86_64 --product swift-testing-revolutionary - - name: Get Current Tag - run: echo "TAG_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - name: Make Artifact Bundle - run: | - swift package --allow-writing-to-package-directory generate-artifact-bundle \ - --package-version ${{ env.TAG_NAME }} \ - --executable-name swift-testing-revolutionary \ - --build-config release \ - --build-folder .build + - uses: actions/checkout@v4 + - name: Build Universal Binary + run: swift build --disable-sandbox -c release --arch arm64 --arch x86_64 --product swift-testing-revolutionary + - uses: giginet/github-action-artifactbundle@v2 + id: artifactbundle + with: + artifact_name: swift-testing-revolutionary - name: Upload Artifact Bundle to Release run: | - gh release upload ${{ env.TAG_NAME }} ./swift-testing-revolutionary.artifactbundle.zip + BODY="${{ github.event.release.body }}" + BUNDLE_PATH="${{ steps.artifactbundle.outputs.bundle_path }}" + SHA256="${{ steps.artifactbundle.outputs.bundle_sha256 }}" + TAG_NAME="${{ github.event.release.tag_name }}" + gh release upload "${TAG_NAME}" "${BUNDLE_PATH}" + NEW_BODY="$(printf "%s\n%s" "$BODY" "$SHA256")" + gh release edit "${TAG_NAME}" --notes "${NEW_BODY}" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a5e73c1..a8d724e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,14 +12,14 @@ jobs: Tests: strategy: matrix: - xcode_version: ["16.0"] + xcode_version: ["16.2"] env: DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode_version }}.app/Contents/Developer" runs-on: macos-14 steps: - name: Get swift version run: swift --version - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Run Tests run: | swift test diff --git a/Package.swift b/Package.swift index 199a22f..e8c1378 100644 --- a/Package.swift +++ b/Package.swift @@ -75,11 +75,3 @@ let package = Package( ], swiftLanguageModes: [.v6] ) - -let isDevelopment = ProcessInfo.processInfo.environment["SWIFT_TESTING_REVOLUTIONARY_DEVELOPMENT"] == "1" - -if isDevelopment { - package.dependencies += [ - .package(url: "https://github.com/freddi-kit/ArtifactBundleGen.git", from: "0.0.6"), - ] -} diff --git a/README.md b/README.md index 77ac9ed..baa6d94 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,14 @@ $ swift package plugin --allow-writing-to-package-directory swift-testing-revolu ### Command Line Tool +#### Use binary with [mtj0928/nest](https://github.com/mtj0928/nest) (Recommended) + +```console +$ nest install giginet/swift-testing-revolutionary +``` + +#### Source from source + Install this tool and run it from the command line. ```console