Skip to content

2.23.0

2.23.0 #36

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:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Build Release
run: make build
- name: Package release for Mac
if: matrix.os == 'macos-latest'
run: make release-mac
- name: Package release for Linux
if: matrix.os == 'ubuntu-latest'
run: make release-linux
- name: Package release for Windows
if: matrix.os == 'windows-latest'
run: make release-win
- name: Publish to GitHub
uses: softprops/action-gh-release@v2
with:
files: |
./release/*.tar.gz
./release/*.zip
./onefetch-setup.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to Homebrew
uses: mislav/bump-homebrew-formula-action@v3
if: matrix.os == 'macos-latest'
env:
COMMITTER_TOKEN: ${{ secrets.BREW_TOKEN }}
with:
formula-name: onefetch
- name: Publish 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 }}
crates:
name: Publish to crates.io
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- 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