Skip to content

Commit

Permalink
prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene-babichenko committed Jun 13, 2024
1 parent c90322f commit 054b795
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 5 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
on:
push:
tags:
- "v*"

name: Release

jobs:
# cargo_publish:
# name: Publish to crates.io
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Publish
# run: cargo publish --locked --token ${{ secrets.CRATES_IO_TOKEN }}

create_release:
name: Create draft release
runs-on: ubuntu-latest
permissions: write-all
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create draft release
run: gh release create ${{ github.ref_name }} --notes-file CHANGELOG.md --draft

build:
name: Build binaries
needs: create_release
runs-on: ${{ matrix.os }}
permissions: write-all
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ARCHIVE_NAME: fixit-${{ github.ref_name }}-${{ matrix.target }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: aarch64-unknown-linux-musl
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
steps:
- name: Install Rust target
run: rustup target add ${{ matrix.target }}
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: cargo build --release --locked --target ${{ matrix.target }}
- name: Create archive
run: mv ./target/${{ matrix.target }}/release/fixit . && tar -czvf $ARCHIVE_NAME.tar.gz fixit
- name: Checksum
run: sha256sum $ARCHIVE_NAME.tar.gz > $ARCHIVE_NAME.sha256
- name: Upload artifacts
run: gh release upload ${{ github.ref_name }} $ARCHIVE_NAME.{tar.gz,sha256}

publish_release:
name: Publish release
runs-on: ubuntu-latest
needs: build
permissions: write-all
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Publish release
run: gh release edit ${{ github.ref_name }} --draft=false
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
run: npm install -g prettier

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Run cargo fmt
run: cargo fmt --check
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v0.1.0-alpha

## Added

- Initial release
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
[package]
name = "fixit"
version = "0.1.0-alpha"
version = "0.1.0-alpha.1"
edition = "2021"
license = "MIT"
authors = [ "Yevhenii Babichenko <[email protected]>" ]
homepage = "https://github.com/eugene-babichenko/fixit"
repository = "https://github.com/eugene-babichenko/fixit"
readme = "README.md"
categories = [ "command-line-utilities" ]
description = "A utility to fix mistakes in your commands."

[dependencies]
clap = { version = "4", features = ["derive", "env"] }
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ Environment variables:
re-running the given command. This is generally much faster, so it is
recommended that you leave it as is unless you run into any bugs associated
with finding fixes. The combination that can be potentially buggy is
suppported terminal emulator with unsupported multiplexer. The default value
is `true`. Pass `false` to disable.
suppported terminal emulator with unsupported multiplexer when the failed
command is not visible on the screen. The default value is `true`. Pass
`false` to disable.
- `FIXIT_QUICK_SEARCH_DEPTH` sets the number of lines to get from the scrollback
buffer in addition to what we see on the screen. The default is `1000`.

Expand Down

0 comments on commit 054b795

Please sign in to comment.