Build for Linux #73
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build for Linux | |
on: | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: 'Ref to build (branch, tag or SHA)' | |
required: false | |
default: 'main' | |
jobs: | |
build: | |
name: Build SwiftFormat for Linux | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.inputs.ref }} | |
- name: Build it | |
run: | | |
swift build --configuration release | |
SWIFTFORMAT_BIN_PATH=`swift build --configuration release --show-bin-path` | |
mv $SWIFTFORMAT_BIN_PATH/swiftformat "${HOME}/swiftformat_linux" | |
- name: 'Upload Artifact' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: swiftformat_linux | |
path: ~/swiftformat_linux | |
retention-days: 5 |