Skip to content

Commit

Permalink
updating release and lionk
Browse files Browse the repository at this point in the history
  • Loading branch information
leogdion committed Feb 4, 2025
1 parent 3dc8ace commit e71eee7
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 16 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/artifact.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: Create Package Script Artifact
name: Create Package Script Release

on:
push:
branches: [ main ]
workflow_dispatch: # Allows manual triggering

jobs:
create-artifact:
runs-on: ubuntu-latest # Using macOS since the script uses macOS-specific sed
create-release:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
Expand All @@ -18,9 +17,17 @@ jobs:
chmod +x Scripts/artifact.sh
./Scripts/artifact.sh package.sh
- name: Upload package script
uses: actions/upload-artifact@v4
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: package.sh
path: package.sh
retention-days: 180 # Artifacts will be kept for 30 days
name: Latest Package Script
tag_name: latest
files: package.sh
draft: false
prerelease: false
make_latest: true
fail_on_unmatched_files: true
body: |
This is an automatically generated release containing the latest package.sh script.
The previous 'latest' tag will be automatically moved to this release.
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,23 +150,29 @@ let package = Package(
### 3. Generate Package.swift

```bash
./package_generated.sh . --version 5.9
./package.sh . --version 5.9
```

## Installation

1. Download the `package_generated.sh` script from the [latest GitHub release](https://github.com/brightdigit/PackageDSL/releases/latest)
1. Download the `package.sh` script from our [latest release](https://github.com/brightdigit/PackageDSL/releases/latest/download/package.sh)

Or using curl:
```bash
curl -LO https://github.com/brightdigit/PackageDSL/releases/latest/download/package.sh
```

2. Make the script executable:
```bash
chmod +x package_generated.sh
chmod +x package.sh
```

## Usage

The script accepts the following arguments:

```bash
./package_generated.sh [PACKAGE_DIR] [OPTIONS]
./package.sh [PACKAGE_DIR] [OPTIONS]
```

### Arguments
Expand All @@ -182,12 +188,12 @@ The script accepts the following arguments:

Generate Package.swift for the current directory using Swift 5.9:
```bash
./package_generated.sh . --version 5.9
./package.sh . --version 5.9
```

Generate a minimized Package.swift for a specific package:
```bash
./package_generated.sh ~/Projects/MyPackage --version 5.9 --minimize
./package.sh ~/Projects/MyPackage --version 5.9 --minimize
```

## FAQ
Expand Down Expand Up @@ -309,7 +315,7 @@ The DSL is used only at development time to generate your `Package.swift`. There

## Thanks

* [@joshdholtz for inspiration with DeckUI](https://github.com/joshdholtz/DeckUI)
* [joshdholtz](https://github.com/joshdholtz) for inspiration with [DeckUI](https://github.com/joshdholtz/DeckUI)

## Contributing

Expand Down
41 changes: 41 additions & 0 deletions Sources/PackageDSL/PackageDSL.docc/PackageDSL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,47 @@ Swift Packages are a great way to deliver functionality and share code. However,
- **Reduced Complexity**: Simplified syntax for defining products, targets, and dependencies
- **Easy Maintenance**: Update individual components without touching the entire Package.swift file

## Installation

1. Download the `package.sh` script from our [latest release](https://github.com/brightdigit/PackageDSL/releases/latest/download/package.sh)

Or using curl:
```bash
curl -LO https://github.com/brightdigit/PackageDSL/releases/latest/download/package.sh
```

2. Make the script executable:
```bash
chmod +x package.sh
```

## Usage

The script accepts the following arguments:

```bash
./package.sh [PACKAGE_DIR] [OPTIONS]
```

### Arguments
- `PACKAGE_DIR`: Path to your package directory (required)

### Options
- `--version <version>`: Specify Swift tools version (default: 6.0)
- `--minimize`: Minimize the output by removing comments and extra whitespace

### Examples

Generate Package.swift for the current directory using Swift 5.9:
```bash
./package.sh . --version 5.9
```

Generate a minimized Package.swift for a specific package:
```bash
./package.sh ~/Projects/MyPackage --version 5.9 --minimize
```

Here's an example of how you can define your package:

```swift
Expand Down

0 comments on commit e71eee7

Please sign in to comment.