Skip to content

Commit

Permalink
chore: update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pxseu committed Oct 8, 2023
1 parent f7703c3 commit 8b73a0e
Showing 1 changed file with 15 additions and 31 deletions.
46 changes: 15 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
tag_name: ${{ steps.tag.outputs.tag_name }}
steps:
- name: Checkout the repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand Down Expand Up @@ -100,34 +100,26 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: ${{ matrix.target }}
profile: minimal
override: true
targets: ${{ matrix.target }}
components: rustfmt, clippy

- name: Install Wix [Windows]
if: matrix.os == 'windows-latest'
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-wix
run: cargo install cargo-wix

- name: Cache
uses: Swatinem/rust-cache@v2

- name: Build release binary
uses: actions-rs/cargo@v1
with:
command: build
args: --release --locked ${{ matrix.flags }} --target ${{ matrix.target }} --package hop-cli
use-cross: ${{ matrix.os == 'ubuntu-latest' }}
run: ${{ matrix.os == 'ubuntu-latest' && 'cross' || 'cargo' }} build --release --locked ${{ matrix.flags }} --target ${{ matrix.target }} --package hop-cli

- name: Prepare binaries [*nix]
if: matrix.os != 'windows-latest'
Expand All @@ -147,10 +139,7 @@ jobs:
- name: Build installer [Windows]
if: matrix.os == 'windows-latest'
uses: actions-rs/cargo@v1
with:
command: wix
args: -I .\build\windows\main.wxs -v --no-build --nocapture --target ${{ matrix.target }} --output target\wix\hop-${{ matrix.platform }}.msi --package hop-cli
run: cargo wix -I .\build\windows\main.wxs -v --no-build --nocapture --target ${{ matrix.target }} --output target\wix\hop-${{ matrix.platform }}.msi --package hop-cli

- name: Upload binaries
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -197,28 +186,23 @@ jobs:
environment: prod
steps:
- name: Checkout the repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt, clippy

- name: Login to Crates
uses: actions-rs/cargo@v1
with:
command: login
args: ${{ secrets.CARGO_REGISTRY_TOKEN }}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo login

- name: Publish Crates
uses: actions-rs/cargo@v1
with:
command: publish
args: --no-verify
run: cargo publish --locked --no-verify

publish-aur:
name: Publish to AUR
Expand Down

0 comments on commit 8b73a0e

Please sign in to comment.