Skip to content

fix package name

fix package name #3

Workflow file for this run

name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
env:
RUST_VERSION: 1.82.0
BIN_NAME: "sk"
jobs:
publish-crate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install correct toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_VERSION }}
override: true
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
- name: Publish to crates.io
run: cargo publish -p skim
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
build:
name: Build release binaries
strategy:
matrix:
arch:
- x86_64
- aarch64
- arm
- armv7
os:
- unknown-linux-musl
- apple-darwin
exclude:
- arch: arm
os: apple-darwin
- arch: armv7
os: apple-darwin
runs-on: ${{ contains(matrix.os, 'apple') && 'macos' || 'ubuntu' }}-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Clippy
uses: houseabsolute/actions-rust-cross@v0
with:
command: build
target: ${{ matrix.arch }}-${{ matrix.os }}${{ contains(matrix.arch, 'arm') && 'eabi' || '' }}
args: "--release --locked"
- name: Create archive
run: |
tar -C target/*/release/ -czvf "skim-${{ matrix.arch }}-${{ matrix.os }}${{ contains(matrix.arch, 'arm') && 'eabi' || '' }}.tgz" "${{ env.BIN_NAME }}"
- name: Store artifact
uses: actions/upload-artifact@v4
with:
name: binary-${{ matrix.arch }}-${{ matrix.os }}
path: "skim-*.tgz"
retention-days: 1
release-files:
runs-on: ubuntu-22.04
steps:
- name: Checkout Git repo
uses: actions/checkout@v4
- name: Install correct toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_VERSION }}
override: true
- name: Generate manpage
uses: actions-rs/cargo@v1
with:
command: run
args: --package xtask mangen
- name: Generate completions
uses: actions-rs/cargo@v1
with:
command: run
args: --package xtask compgen
- name: Create release archives
run: |
mkdir artifacts
tar -C man -czvf artifacts/man.tgz man1
tar -C shell -czvf artifacts/shell.tgz .
- name: Store artifacts
uses: actions/upload-artifact@v4
with:
name: files
path: "artifacts/*.tgz"
retention-days: 1
release:
runs-on: ubuntu-22.04
needs:
- build
- release-files
- publish-crate
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
pattern: "*"
merge-multiple: true
- run: ls -R
- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
- name: Create Release
uses: ncipollo/[email protected]
with:
allowUpdates: true
draft: false
makeLatest: true
body: ${{ steps.changelog.outputs.changes }}
artifacts: |
artifacts/**