forked from starship/starship
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split Windows and -nix asset preparation steps
- Loading branch information
Showing
1 changed file
with
22 additions
and
16 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 |
---|---|---|
|
@@ -18,7 +18,9 @@ jobs: | |
- uses: actions/checkout@v1 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
components: rustfmt | ||
override: true | ||
- run: rustup component add rustfmt | ||
- uses: actions-rs/cargo@v1 | ||
|
@@ -34,9 +36,10 @@ jobs: | |
- uses: actions/checkout@v1 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
components: clippy | ||
override: true | ||
- run: rustup component add clippy | ||
- uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -66,6 +69,7 @@ jobs: | |
- uses: actions/checkout@v1 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- uses: actions-rs/cargo@v1 | ||
|
@@ -91,6 +95,7 @@ jobs: | |
# Install all the required dependencies for testing | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
|
@@ -154,6 +159,7 @@ jobs: | |
- uses: actions/checkout@v1 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- run: cargo login $CRATES_IO_TOKEN | ||
|
@@ -170,9 +176,9 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v1 | ||
- run: | | ||
git config --global user.name starship-bot | ||
git config --global user.email [email protected] | ||
- run: | | ||
git config user.email "bot@starship.rs" | ||
git config user.name "Starship Bot" | ||
cd $(brew --repo homebrew/core) | ||
git fetch origin | ||
sudo git reset --hard origin/master | ||
|
@@ -218,6 +224,7 @@ jobs: | |
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
target: ${{ matrix.target }} | ||
|
@@ -232,21 +239,20 @@ jobs: | |
command: build | ||
args: --release --target ${{ matrix.target }} | ||
|
||
- name: Prepare build artifacts | ||
- name: Prepare build artifacts [Windows] | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
if [[ "${{ matrix.os }}" == "windows-latest" ]] | ||
then | ||
strip target/${{ matrix.target }}/release/starship.exe | ||
cd target/${{ matrix.target }}/release | ||
7z a ../../../${{ matrix.name }} starship.exe | ||
else | ||
strip target/${{ matrix.target }}/release/starship | ||
cd target/${{ matrix.target }}/release | ||
tar czvf ../../../${{ matrix.name }} starship | ||
fi | ||
cd - | ||
strip target/${{ matrix.target }}/release/starship.exe | ||
7z a ${{ matrix.name }} target/${{ matrix.target }}/release/starship.exe | ||
- name: Prepare build artifacts [-nix] | ||
if: matrix.os != 'windows-latest' | ||
run: | | ||
strip target/${{ matrix.target }}/release/starship | ||
tar czvf ${{ matrix.name }} target/${{ matrix.target }}/release/starship | ||
- name: Generate release notes | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
# Temporary fix for https://github.com/actions/setup-go/issues/14 | ||
export PATH=$PATH:$(go env GOPATH)/bin | ||
|