-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
155 additions
and
59 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
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,64 @@ | ||
--- | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
workflow_call: | ||
|
||
env: | ||
CARGO_NET_RETRY: 10 | ||
CARGO_TERM_COLOR: always | ||
RUSTFLAGS: "-D warnings" | ||
RUST_BACKTRACE: 1 | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
include: | ||
- name: Apple Silicon | ||
target: aarch64-apple-darwin | ||
arch: arm64 | ||
host: macos-latest | ||
os: darwin | ||
- name: Apple x86_64 | ||
target: x86_64-apple-darwin | ||
arch: amd64 | ||
host: macos-latest | ||
os: darwin | ||
|
||
runs-on: ${{ matrix.host }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Rust Toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: clippy, rustfmt | ||
targets: ${{ matrix.target }} | ||
toolchain: stable | ||
|
||
- uses: swatinem/rust-cache@v2 | ||
- uses: extractions/setup-just@v1 | ||
|
||
- name: Versions | ||
run: | | ||
git version | ||
cargo version | ||
- name: Format Check | ||
run: just format-check | ||
|
||
- name: Clippy | ||
run: just lint | ||
|
||
- name: Build & Test | ||
id: build | ||
run: | | ||
cargo build --release --target ${{ matrix.target }} | ||
cargo 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,48 @@ | ||
--- | ||
name: Publish | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
homebrew: | ||
name: Publish to dsully/homebrew-tap | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Release my project to my Homebrew tap | ||
uses: Justintime50/homebrew-releaser@v1 | ||
with: | ||
homebrew_owner: dsully | ||
homebrew_tap: homebrew-tap | ||
formula_folder: Formula | ||
|
||
commit_owner: Dan Sully | ||
commit_email: [email protected] | ||
|
||
github_token: ${{ secrets.HOMEBREW_GITHUB_TOKEN }} | ||
|
||
install: | | ||
bin.install "macos-defaults" | ||
output = Utils.popen_read("#{bin}/macos-saves completions bash") | ||
(bash_completion/"macos-defaults").write output | ||
output = Utils.popen_read("#{bin}/macos-saves completions fish") | ||
(fish_completion/"macos-defaults").write output | ||
output = Utils.popen_read("#{bin}/macos-saves completions zsh") | ||
(zsh_completion/"macos-defaults").write output | ||
prefix.install_metafiles | ||
test: | | ||
system "macos-defaults -h" | ||
target_darwin_amd64: true | ||
target_darwin_arm64: true | ||
target_linux_amd64: false | ||
target_linux_arm64: false | ||
|
||
update_readme_table: true | ||
|
||
debug: true |
This file was deleted.
Oops, something went wrong.