Improve the matrix of releases

This commit is contained in:
Ferran Basora 2022-01-30 21:28:44 +00:00
parent db2663d547
commit bbf677fda3
5 changed files with 34 additions and 36 deletions

View File

@ -1,36 +1,27 @@
name: release
on:
push:
tags:
- '*'
workflow_dispatch:
release:
types: [published]
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: build
uses: sassman/rust-deb-builder@v1.57.0
with:
target: x86_64-unknown-linux-musl
- name: package
run: |
cd "$GITHUB_WORKSPACE"
mkdir -p package
mkdir -p package/target/release
cp -v tmux-thumbs.sh tmux-thumbs.tmux package/
cp -v target/x86_64-unknown-linux-musl/release/thumbs package/target/release
cp -v target/x86_64-unknown-linux-musl/release/tmux-thumbs package/target/release
tar czvf tmux-thumbs.x86_64-musl.tar.gz package/*
- name: create_release
uses: ncipollo/release-action@v1.9.0
with:
artifactErrorsFailBuild: true
artifacts: "tmux-thumbs.x86_64-musl.tar.gz"
release:
name: release ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-musl
archive: tar.gz tar.xz
- target: x86_64-apple-darwin
archive: zip
steps:
- uses: actions/checkout@master
- name: Compile and release
uses: rust-build/rust-build.action@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUSTTARGET: ${{ matrix.target }}
EXTRA_FILES: "tmux-thumbs.sh tmux-thumbs.tmux tmux-thumbs-install.sh"
ARCHIVE_TYPES: ${{ matrix.archive }}

2
Cargo.lock generated
View File

@ -155,7 +155,7 @@ dependencies = [
[[package]]
name = "thumbs"
version = "0.6.1"
version = "0.7.0"
dependencies = [
"base64",
"clap",

View File

@ -1,6 +1,6 @@
[package]
name = "thumbs"
version = "0.6.1"
version = "0.7.0"
authors = ["Ferran Basora <fcsonline@gmail.com>"]
edition = "2018"
description = "A lightning fast version copy/pasting like vimium/vimperator"

View File

@ -433,7 +433,7 @@ cargo install thumbs
And those are all available options:
```
thumbs 0.6.0
thumbs 0.7.0
A lightning fast version copy/pasting like vimium/vimperator
USAGE:

View File

@ -1,9 +1,16 @@
#!/usr/bin/env bash
set -Eeu -o pipefail
# Setup env variables to be compatible with compiled and bundled installations
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BINARY="${CURRENT_DIR}/target/release/thumbs"
if [ -d .git ]; then
RELEASE_DIR="${CURRENT_DIR}/target/release"
else
RELEASE_DIR=${CURRENT_DIR}
fi
BINARY="${RELEASE_DIR}/thumbs"
if [ ! -f "$BINARY" ]; then
tmux split-window "cd ${CURRENT_DIR} && bash ./tmux-thumbs-install.sh"
@ -43,4 +50,4 @@ add-param upcase-command string
add-param multi-command string
add-param osc52 boolean
"${CURRENT_DIR}/target/release/tmux-thumbs" "${PARAMS[@]}" || true
"${RELEASE_DIR}/tmux-thumbs" "${PARAMS[@]}" || true