Swiftpack.co - elegantchaos/ActionBuilderCore as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by elegantchaos.
elegantchaos/ActionBuilderCore v1.1.1
Swift code to build Github Action workflows to test Swift packages
⭐️ 0
🕓 2 weeks ago
.package(url: "https://github.com/elegantchaos/ActionBuilderCore.git", from: "v1.1.1")

comment: <> (Header Generated by ActionBuilderTool 1.1.0 (42))

Test results Latest release swift 5.6 shield swift 5.7 shield Platforms: Linux, macOS


Swift code that can take a Swift package, and create a Github Action workflow for it.

The workflow will build and test the package using Github Actions.


The exact steps that the workflow executes can be configured.

These include:

  • platforms to test, from: macOS, iOS, tvOS, watchOS, linux
  • swift versions to test against, from: 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, and the nightly build
  • the configuration to test: debug, release
  • whether to run tests or just build
  • whether to upload build logs
  • whether to post a notification to a slack channel
  • whether to ammend a header to the README
  • whether to test against every requested swift version, or just the earliest and latest

These settings are read from an .actionbuilder.json file in the root of the package directory. If it is missing, some defaults are chosen.

If they aren't explicitly set in the configuration file, the code attempts to pick sensible values by examining the Package.swift manifest:

  • the tool version of the manifest is used to determine the version of Swift to test against.
  • the platform minimum deployment versions listed in the manifest are used to determine platforms to test against

If the package manifest includes a minimum deployment for macOS, the linux platform is also added by default. If no minimum deployment information is present, the macOS and linux platforms are added by default. If these defaults aren't what you need, you can specify exact values using a config file (see below).

Config Format

Here is an example of .actionbuilder.json:

    "name": "TestPackage",
    "owner": "TestOwner",
    "platforms": ["macOS", "linux"],
    "compilers": ["swift55", "swiftNightly"],
    "configurations": ["release"],
    "test": true,
    "header": false,
    "firstlast": false,
    "uploadLogs": false,
    "postSlackNotification": false


This code was originally part of Action Status, which is a little macOS/iOS tool I made for monitoring Github Actions.

I've now split the code out so that it can be used in other places.

I plan to remove the generation functionality from Action Status, and instead make a standlone Action Builder application (probably macOS only).

I have also created an SPM command plugin, so that you can generate workflows directly from the command line.


Stars: 0
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

2 weeks ago

Use newest tool.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics