Compare commits

..

No commits in common. "8032cfa0b2f4070e407f3000959b4b506ac972a0" and "b2f310dd203cab101125e816ce1dfa144a65eb64" have entirely different histories.

2 changed files with 11 additions and 6 deletions

View file

@ -70,7 +70,7 @@ jobs:
- name: Create release - name: Create release
uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2.4.1 uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2.4.1
with: with:
tag_name: TailwindCSSCLI-${{ inputs.tailwind_version }}-${{ steps.checksum.outputs.checksum }} tag_name: TailwindCSSCLI-${{ inputs.tailwind_version }}
name: TailwindCSS CLI ${{ inputs.tailwind_version }} name: TailwindCSS CLI ${{ inputs.tailwind_version }}
body: | body: |
## TailwindCSS CLI Artifact Bundles ## TailwindCSS CLI Artifact Bundles
@ -82,14 +82,20 @@ jobs:
- macOS x64 (`x86_64-apple-darwin`) - macOS x64 (`x86_64-apple-darwin`)
- macOS ARM64 (`aarch64-apple-darwin`) - macOS ARM64 (`aarch64-apple-darwin`)
### Binary Target Definition ### Usage
Add the artifact bundle to your `Package.swift`:
```swift ```swift
.binaryTarget( .binaryTarget(
name: "TailwindCSSCLI", name: "TailwindCSSCLI",
url: "https://github.com/${{ github.repository }}/releases/download/TailwindCSSCLI-${{ inputs.tailwind_version }}-${{ steps.checksum.outputs.checksum }}/tailwindcss.artifactbundleindex", url: "https://github.com/${{ github.repository }}/releases/download/TailwindCSSCLI@${{ inputs.tailwind_version }}/tailwindcss.artifactbundleindex",
checksum: "${{ steps.checksum.outputs.checksum }}" checksum: "${{ steps.checksum.outputs.checksum }}"
) )
``` ```
### Checksum
```
${{ steps.checksum.outputs.checksum }}
```
draft: false draft: false
prerelease: false prerelease: false
make_latest: false make_latest: false

View file

@ -22,12 +22,11 @@ extension ArtifactBundleBuilder {
} }
let bundleDirURL = URL(fileURLWithPath: bundleDir) let bundleDirURL = URL(fileURLWithPath: bundleDir)
let bundleName = bundleDirURL.lastPathComponent
let process = Process() let process = Process()
process.executableURL = URL(fileURLWithPath: "/usr/bin/zip") process.executableURL = URL(fileURLWithPath: "/usr/bin/zip")
let zipPathURL = URL(fileURLWithPath: zipPath).standardizedFileURL process.arguments = ["-r", zipPath, bundleName]
process.arguments = ["-r", zipPathURL.path, "."]
process.currentDirectoryURL = bundleDirURL
try process.run() try process.run()
process.waitUntilExit() process.waitUntilExit()