-
Notifications
You must be signed in to change notification settings - Fork 48
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
14 changed files
with
866 additions
and
737 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 |
---|---|---|
|
@@ -5,41 +5,67 @@ on: | |
types: [published] | ||
|
||
jobs: | ||
build-artifact: | ||
build-release: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
include: | ||
- os: ubuntu-latest | ||
exe_suffix: "" | ||
name_suffix: "" | ||
target: x86_64-unknown-linux-musl | ||
- os: macos-latest | ||
exe_suffix: "" | ||
name_suffix: ".arm" | ||
target: aarch64-apple-darwin | ||
- os: windows-latest | ||
exe_suffix: ".exe" | ||
name_suffix: ".exe" | ||
target: x86_64-pc-windows-msvc | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
target: ${{ matrix.target }} | ||
override: true | ||
- uses: actions/checkout@v3 | ||
- name: Update rust | ||
run: rustup update | ||
- name: Add target | ||
run: rustup target add ${{ matrix.target }} | ||
- name: Cache dependencies | ||
uses: Swatinem/rust-cache@v1 | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release --locked --verbose --target ${{ matrix.target }} | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Build | ||
run: "cargo build --release --locked --verbose --target ${{ matrix.target }}" | ||
- name: Upload asset | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
asset_path: target/${{ matrix.target }}/release/dotter${{ matrix.exe_suffix }} | ||
asset_name: dotter${{ matrix.exe_suffix }} | ||
asset_name: dotter${{ matrix.name_suffix }} | ||
asset_content_type: application/octet-stream | ||
upload_url: ${{ github.event.release.upload_url }} | ||
build-completions: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Update rust | ||
run: rustup update | ||
- name: Cache dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Generate Completions | ||
run: | | ||
cargo build | ||
SHELLS="bash elvish fish powershell zsh" | ||
mkdir completions | ||
for shell in $SHELLS; do | ||
cargo run -- gen-completions --shell $shell --to completions | ||
done | ||
zip -r completions.zip completions | ||
- name: Upload Assets | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: completions.zip | ||
cargo-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
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
Oops, something went wrong.