2.2.0 • Published 2 years ago

install-swift-tool v2.2.0

Weekly downloads
11
License
MIT
Repository
github
Last release
2 years ago

Description

Github action to install swift based tools, like xcbeautify or swiftformat, to be used inside workflows.

Versions

master - It should always work and contain the latest changes.

v1 - Initial version. Deprecated, use v2 with use-cache: false instead.

v2 - Adds caching (enabled by default), allows specifying version.

Usage

Step example:

- name: Install xcbeautify
  uses: Cyberbeni/install-swift-tool@v2
  with:
    url: https://github.com/Cyberbeni/xcbeautify
    branch: linux-fixes # optional, branch or tag
    version: '*' # optional, overrides branch, format: https://devhints.io/semver
    use-cache: true # optinal, default: true

Workflow example:

name: Lint

on: 
  pull_request:
  push:
    branches: master # https://docs.github.com/en/free-pro-team@latest/actions/guides/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache

jobs:
  swiftformat-lint:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Install SwiftFormat
      uses: Cyberbeni/install-swift-tool@v2
      with:
        url: https://github.com/nicklockwood/SwiftFormat
    - name: Lint
      run: swiftformat --lint .

GitHub Action example:

import { SwiftToolInstaller } from 'install-swift-tool'

await SwiftToolInstaller.install(url, branch, version, useCache)

How to contribute

Install npm and yarn on macOS (Homebrew required)

make once-mac

Run before commit

make

Run tests in ./__test__/ (for testing parts of the logic, the real tests are run on GitHub after push/pull request)

make test
2.2.0

2 years ago

2.1.17

3 years ago

2.1.16

3 years ago

2.1.12

3 years ago

2.1.11

3 years ago

2.1.10

3 years ago

2.1.9

4 years ago

2.1.8

4 years ago

2.1.7

4 years ago

2.1.6

4 years ago

2.1.5

4 years ago

2.1.4

4 years ago

2.1.3

4 years ago