-
-
Notifications
You must be signed in to change notification settings - Fork 624
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new GH actions for release automation
- Loading branch information
Showing
4 changed files
with
79 additions
and
21 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,34 +17,16 @@ jobs: | |
linux_build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# - name: Setup Swift | ||
# # You may pin to the exact commit or the version. | ||
# # uses: swift-actions/setup-swift@65540b95f51493d65f5e59e97dcef9629ddf11bf | ||
# uses: swift-actions/[email protected] | ||
# with: | ||
# # Swift version to configure | ||
# swift-version: 5.9 # default is 5.8 | ||
- name: Setup Swift environment for macOS, Linux and Windows | ||
uses: SwiftyLab/[email protected] | ||
- name: Setup Swift | ||
uses: swift-actions/[email protected] | ||
with: | ||
swift-version: "5.9" | ||
swift-version: "5.9.2" | ||
- name: Get swift version | ||
run: swift --version | ||
- uses: actions/checkout@v3 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 | ||
with: | ||
ruby-version: '3.1' | ||
- name: Install dependencies | ||
run: | | ||
sudo apt install libffi-dev | ||
sudo apt install build-essential | ||
sudo apt install libsqlite3-dev | ||
sudo apt-get install libncurses5-dev | ||
shell: bash | ||
- name: Bundle Install | ||
run: bundle install | ||
- name: Swift Build | ||
run: swift build | ||
- name: Run tests | ||
run: swift test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag-name: | ||
description: 'The git tag name to bump the formula to' | ||
required: true | ||
|
||
jobs: | ||
homebrew: | ||
name: Bump Homebrew formula | ||
runs-on: macos-13 | ||
steps: | ||
- uses: mislav/bump-homebrew-formula-action@v3 | ||
with: | ||
formula-name: sourcery | ||
tag-name: ${{ github.event.inputs.tag-name }} | ||
env: | ||
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_COMMITTER_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
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 --static-swift-stdlib --enable-dead-strip | ||
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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
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 --static-swift-stdlib --enable-dead-strip | ||
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 |