mirror of
https://github.com/laosb/SwiftTailwind.git
synced 2026-03-01 16:48:22 +00:00
Compare commits
3 commits
b2f310dd20
...
8032cfa0b2
| Author | SHA1 | Date | |
|---|---|---|---|
| 8032cfa0b2 | |||
| f9024a8cd7 | |||
| 9be0695c55 |
2 changed files with 6 additions and 11 deletions
12
.github/workflows/release-tailwindcss-cli.yml
vendored
12
.github/workflows/release-tailwindcss-cli.yml
vendored
|
|
@ -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 }}
|
tag_name: TailwindCSSCLI-${{ inputs.tailwind_version }}-${{ steps.checksum.outputs.checksum }}
|
||||||
name: TailwindCSS CLI ${{ inputs.tailwind_version }}
|
name: TailwindCSS CLI ${{ inputs.tailwind_version }}
|
||||||
body: |
|
body: |
|
||||||
## TailwindCSS CLI Artifact Bundles
|
## TailwindCSS CLI Artifact Bundles
|
||||||
|
|
@ -82,20 +82,14 @@ jobs:
|
||||||
- macOS x64 (`x86_64-apple-darwin`)
|
- macOS x64 (`x86_64-apple-darwin`)
|
||||||
- macOS ARM64 (`aarch64-apple-darwin`)
|
- macOS ARM64 (`aarch64-apple-darwin`)
|
||||||
|
|
||||||
### Usage
|
### Binary Target Definition
|
||||||
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 }}/tailwindcss.artifactbundleindex",
|
url: "https://github.com/${{ github.repository }}/releases/download/TailwindCSSCLI-${{ inputs.tailwind_version }}-${{ steps.checksum.outputs.checksum }}/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
|
||||||
|
|
|
||||||
|
|
@ -22,11 +22,12 @@ 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")
|
||||||
process.arguments = ["-r", zipPath, bundleName]
|
let zipPathURL = URL(fileURLWithPath: zipPath).standardizedFileURL
|
||||||
|
process.arguments = ["-r", zipPathURL.path, "."]
|
||||||
|
process.currentDirectoryURL = bundleDirURL
|
||||||
|
|
||||||
try process.run()
|
try process.run()
|
||||||
process.waitUntilExit()
|
process.waitUntilExit()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue