Skip to content

2.22.0

2.22.0 #32

Workflow file for this run

name: CD
on:
release:
types: [published]
env:
CARGO_TERM_COLOR: always
jobs:
deploy:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: clippy
- name: Build
run: make build
- name: Build Release Mac
if: matrix.os == 'macos-latest'
run: make release-mac
- name: Build Release Linux
if: matrix.os == 'ubuntu-latest'
run: make release-linux
- name: Build Release Win
if: matrix.os == 'windows-latest'
run: make release-win
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
./release/*.tar.gz
./release/*.zip
./onefetch-setup.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Bump homebrew-core formula
uses: mislav/bump-homebrew-formula-action@v3
if: matrix.os == 'macos-latest'
env:
COMMITTER_TOKEN: ${{ secrets.BREW_TOKEN }}
with:
formula-name: onefetch
- name: Publish executable to WinGet
uses: vedantmgoyal9/winget-releaser@main
if: matrix.os == 'windows-latest'
with:
identifier: o2sh.onefetch
installers-regex: '\.exe$'
version: ${{ github.event.release.tag_name }}
token: ${{ secrets.WINGET_TOKEN }}
cargo-publish:
name: Publish to crates.io
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: clippy
- name: Publish to crates.io (ascii)
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish -p onefetch-ascii
- name: Publish to crates.io (image)
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish -p onefetch-image
- name: Publish to crates.io (manifest)
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish -p onefetch-manifest
- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish