-
Notifications
You must be signed in to change notification settings - Fork 14
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
1 parent
11fa530
commit ffb2d94
Showing
17 changed files
with
756 additions
and
303 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 |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
jobs: | ||
sanity: | ||
name: Sanity Check | ||
runs-on: macos-latest | ||
env: | ||
CARGO_TERM_COLOR: always | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Restore cached dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cargo | ||
key: cargo-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Setup Rust | ||
run: rustup target add x86_64-apple-darwin aarch64-apple-darwin | ||
- name: Analyze code | ||
run: make check | ||
versionCheck: | ||
name: Check version | ||
runs-on: macos-latest | ||
needs: sanity | ||
outputs: | ||
build: ${{ steps.check.outputs.build }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- id: check | ||
name: Check version | ||
run: | | ||
VERSION=$(cargo read-manifest | jq -r .version) | ||
gh release view v$VERSION || echo "build=true" >> $GITHUB_OUTPUT | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
build: | ||
name: Build | ||
runs-on: macos-latest | ||
needs: versionCheck | ||
if: ${{ needs.versionCheck.outputs.build == 'true' }} | ||
env: | ||
CARGO_TERM_COLOR: always | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Restore cached dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cargo | ||
key: cargo-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Setup Rust | ||
run: rustup target add x86_64-apple-darwin aarch64-apple-darwin | ||
- name: Build (Intel) | ||
run: make build ARCH=x86_64-apple-darwin | ||
- name: Build (Apple Silicon) | ||
run: make build ARCH=aarch64-apple-darwin | ||
- name: Save artifacts (Intel) | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: x86_64-apple-darwin | ||
path: ./dist/x86_64-apple-darwin/Alfred Chrome.alfredworkflow | ||
- name: Save artifacts (Apple Silicon) | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: aarch64-apple-darwin | ||
path: ./dist/aarch64-apple-darwin/Alfred Chrome.alfredworkflow | ||
release: | ||
name: Release | ||
runs-on: macos-latest | ||
needs: build | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
path: artifacts | ||
- name: Create release | ||
run: | | ||
VERSION=$(cargo read-manifest | jq -r .version) | ||
mkdir release | ||
mv "artifacts/x86_64-apple-darwin/Alfred Chrome.alfredworkflow" "release/Alfred Chrome (Intel).alfredworkflow" | ||
mv "artifacts/aarch64-apple-darwin/Alfred Chrome.alfredworkflow" "release/Alfred Chrome (Apple Silicon).alfredworkflow" | ||
gh release create -t $VERSION v$VERSION release/* | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
/alfred-chrome | ||
vendor/ | ||
dist/ | ||
target/ |
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,25 @@ | ||
[package] | ||
name = "alfred-chrome" | ||
version = "5.0.0" | ||
edition = "2021" | ||
description = "Opens a URL in Google Chrome, optionally in incognito and with specific profile." | ||
homepage = "https://sw.cowtech.it/alfred-chrome" | ||
repository = "https://github.com/ShogunPanda/alfred-chrome" | ||
license = "ISC" | ||
keywords = ["terminal"] | ||
categories = ["command-line-utilities", "command-line-interface"] | ||
|
||
[dependencies] | ||
glob = "^0.3.0" | ||
md-5 = "^0.10.5" | ||
plist = "^1.3.1" | ||
serde = { version = "^1.0.149", features = ["derive"] } | ||
serde_json = { version = "^1.0.89" } | ||
|
||
[profile.release] | ||
opt-level = 3 | ||
lto = true | ||
debug = 0 | ||
strip = "symbols" | ||
codegen-units = 1 | ||
debug-assertions = false |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.