Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ concurrency:
jobs:
tag-release:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.version.outputs.tag }}
version: ${{ steps.version.outputs.version }}
is_new: ${{ steps.check.outputs.exists == 'false' }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -55,3 +59,45 @@ jobs:
tag_name: ${{ steps.version.outputs.tag }}
name: ${{ steps.version.outputs.tag }}
generate_release_notes: true

build-binaries:
needs: tag-release
if: needs.tag-release.outputs.is_new == 'true'
strategy:
matrix:
include:
- os: macos-14
target: aarch64-apple-darwin
- os: macos-13
target: x86_64-apple-darwin
- os: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.tag-release.outputs.tag }}

- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Build
run: cargo build --release --locked --target ${{ matrix.target }}

- name: Package
id: package
run: |
set -euo pipefail
name="git-task-${{ needs.tag-release.outputs.version }}-${{ matrix.target }}"
dir="target/${{ matrix.target }}/release"
tar -czf "${name}.tar.gz" -C "${dir}" git-task gtask
echo "asset=${name}.tar.gz" >> "$GITHUB_OUTPUT"

- name: Upload to release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.tag-release.outputs.tag }}
files: ${{ steps.package.outputs.asset }}
12 changes: 11 additions & 1 deletion Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "git-task"
version = "1.0.1"
version = "1.0.2"
edition = "2021"

[lib]
Expand All @@ -17,7 +17,7 @@ path = "src/bin/gtask.rs"

[dependencies]
clap = { version = "4", features = ["derive", "string"] }
git2 = "0.19"
git2 = { version = "0.19", features = ["vendored-openssl"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
Expand Down
Loading