Skip to content

Commit

Permalink
release v0.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
soywod committed Apr 20, 2023
1 parent c4ebd72 commit 9cbaee6
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 32 deletions.
103 changes: 73 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,18 @@ jobs:
release_name: ${{ github.ref }}
draft: false
prerelease: false
deploy_linux_macos_windows_github:

deploy_linux_macos_github:
runs-on: ${{ matrix.os }}
needs: create_release
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
os_name: linux
- os: macos-latest
os_name: macos
- os: windows-latest
os_name: windows
- os: ubuntu-latest
os_name: linux
- os: macos-latest
os_name: macos
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -59,28 +58,17 @@ jobs:
run: nix-store --import < /tmp/nix-cache
- name: Build release
run: nix develop -c cargo build --release
- name: Compress executable (unix)
if: matrix.os_name == 'linux' || matrix.os_name == 'macos'
run: |
mkdir -p target/release/{man,completions}
target/release/comodoro man target/release/man
target/release/comodoro completion bash > target/release/completions/comodoro.bash
target/release/comodoro completion elvish > target/release/completions/comodoro.elvish
target/release/comodoro completion fish > target/release/completions/comodoro.fish
target/release/comodoro completion powershell > target/release/completions/comodoro.powershell
target/release/comodoro completion zsh > target/release/completions/comodoro.zsh
tar czf comodoro.tar.gz -C target/release comodoro man completions
- name: Compress executable (windows)
if: matrix.os_name == 'windows'
- name: Compress executable
run: |
mkdir -p target/release/{man,completions}
target/release/comodoro.exe man target/release/man
target/release/comodoro.exe completion bash > target/release/completions/comodoro.bash
target/release/comodoro.exe completion elvish > target/release/completions/comodoro.elvish
target/release/comodoro.exe completion fish > target/release/completions/comodoro.fish
target/release/comodoro.exe completion powershell > target/release/completions/comodoro.powershell
target/release/comodoro.exe completion zsh > target/release/completions/comodoro.zsh
tar czf comodoro.tar.gz -C target/release comodoro.exe man completions
mkdir -p {man,completions}
mv target/release/comodoro .
./comodoro man ./man
./comodoro completion bash > ./completions/comodoro.bash
./comodoro completion elvish > ./completions/comodoro.elvish
./comodoro completion fish > ./completions/comodoro.fish
./comodoro completion powershell > ./completions/comodoro.powershell
./comodoro completion zsh > ./completions/comodoro.zsh
tar czf comodoro.tar.gz comodoro man completions
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
Expand All @@ -93,16 +81,70 @@ jobs:
- name: Export Nix store cache
if: ${{ steps.nix-cache.outputs.cache-hit != 'true' }}
run: nix-store --export $(find /nix/store -maxdepth 1 -name '*-*') > /tmp/nix-cache

deploy_windows_github:
runs-on: windows-latest
needs: create_release
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Check project
uses: actions-rs/cargo@v1
with:
command: check
- name: Builds release
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Compress executable
run: |
mkdir man
mkdir completions
move target/release/comodoro.exe .
./comodoro.exe man ./man
./comodoro.exe completion bash > ./completions/comodoro.bash
./comodoro.exe completion elvish > ./completions/comodoro.elvish
./comodoro.exe completion fish > ./completions/comodoro.fish
./comodoro.exe completion powershell > ./completions/comodoro.powershell
./comodoro.exe completion zsh > ./completions/comodoro.zsh
tar czf comodoro.tar.gz comodoro.exe man completions
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: comodoro.tar.gz
asset_name: comodoro-windows.tar.gz
asset_content_type: application/gzip

deploy_musl_github:
runs-on: ubuntu-latest
needs: create_release
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build release
run: docker run -v "${PWD}:/volume" --rm -t clux/muslrust:stable cargo build --release
run: |
docker run -v "${PWD}:/volume" --rm -t clux/muslrust:stable /bin/bash -c "cargo build --release && \
cd target/x86_64-unknown-linux-musl/release && \
mkdir -p {man,completions} && \
./comodoro man ./man && \
./comodoro completion bash > ./completions/comodoro.bash && \
./comodoro completion elvish > ./completions/comodoro.elvish && \
./comodoro completion fish > ./completions/comodoro.fish && \
./comodoro completion powershell > ./completions/comodoro.powershell && \
./comodoro completion zsh > ./completions/comodoro.zsh"
- name: Compress executable
run: tar czf comodoro.tar.gz -C target/x86_64-unknown-linux-musl/release comodoro
run: |
tar czf comodoro.tar.gz -C target/x86_64-unknown-linux-musl/release comodoro man completions
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
Expand All @@ -112,6 +154,7 @@ jobs:
asset_path: comodoro.tar.gz
asset_name: comodoro-musl.tar.gz
asset_content_type: application/gzip

deploy_crates:
runs-on: ubuntu-latest
needs: create_release
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.0.5] - 2023-04-20

### Changed

- Replaced `pimalaya` by `pimalaya-pomodoro`.

### Removed

- Removed durations and hooks from `TcpConfig`, since they conflicted
with the ones from the main config.

## [0.0.4] - 2023-04-14

### Fixed
Expand Down
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.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "comodoro"
description = "CLI to manage your time using the Pomodoro technique."
version = "0.0.4"
version = "0.0.5"
authors = ["soywod <[email protected]>"]
edition = "2021"
license = "MIT"
Expand Down

0 comments on commit 9cbaee6

Please sign in to comment.