Skip to content

Commit 48e92d8

Browse files
committed
chore: bump project versions to 0.10.0
Raise the crate versions to 0.10.0. Update README to show the new current release and bump the version fields in langcodec/Cargo.toml and langcodec-cli/Cargo.toml. Also update the langcodec dependency reference in langcodec-cli to match the new 0.10.0 version.
1 parent e30a0c1 commit 48e92d8

5 files changed

Lines changed: 108 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
14+
jobs:
15+
build:
16+
name: Build ${{ matrix.target }}
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- os: ubuntu-24.04
23+
target: x86_64-unknown-linux-gnu
24+
archive_ext: tar.gz
25+
binary_name: langcodec
26+
- os: macos-13
27+
target: x86_64-apple-darwin
28+
archive_ext: tar.gz
29+
binary_name: langcodec
30+
- os: macos-14
31+
target: aarch64-apple-darwin
32+
archive_ext: tar.gz
33+
binary_name: langcodec
34+
- os: windows-2022
35+
target: x86_64-pc-windows-msvc
36+
archive_ext: zip
37+
binary_name: langcodec.exe
38+
39+
steps:
40+
- uses: actions/checkout@v4
41+
42+
- name: Install Rust (stable)
43+
uses: dtolnay/rust-toolchain@stable
44+
with:
45+
toolchain: stable
46+
targets: ${{ matrix.target }}
47+
48+
- name: Build release binary
49+
run: cargo build --release -p langcodec-cli --target ${{ matrix.target }}
50+
51+
- name: Package artifact (Unix)
52+
if: runner.os != 'Windows'
53+
shell: bash
54+
run: |
55+
set -euo pipefail
56+
version="${GITHUB_REF_NAME}"
57+
archive="langcodec-${version}-${{ matrix.target }}.${{ matrix.archive_ext }}"
58+
binary_dir="dist/langcodec-${version}-${{ matrix.target }}"
59+
mkdir -p "${binary_dir}"
60+
cp "target/${{ matrix.target }}/release/${{ matrix.binary_name }}" "${binary_dir}/langcodec"
61+
tar -C dist -czf "${archive}" "langcodec-${version}-${{ matrix.target }}"
62+
shasum -a 256 "${archive}" > "${archive}.sha256"
63+
64+
- name: Package artifact (Windows)
65+
if: runner.os == 'Windows'
66+
shell: pwsh
67+
run: |
68+
$version = $env:GITHUB_REF_NAME
69+
$folder = "langcodec-$version-${{ matrix.target }}"
70+
$archive = "$folder.${{ matrix.archive_ext }}"
71+
New-Item -ItemType Directory -Force -Path "dist/$folder" | Out-Null
72+
Copy-Item "target/${{ matrix.target }}/release/${{ matrix.binary_name }}" "dist/$folder/langcodec.exe"
73+
Compress-Archive -Path "dist/$folder" -DestinationPath $archive
74+
$hash = (Get-FileHash -Algorithm SHA256 $archive).Hash.ToLower()
75+
"$hash $archive" | Out-File -Encoding ascii "$archive.sha256"
76+
77+
- name: Upload packaged artifacts
78+
uses: actions/upload-artifact@v4
79+
with:
80+
name: release-${{ matrix.target }}
81+
path: |
82+
langcodec-${{ github.ref_name }}-${{ matrix.target }}.${{ matrix.archive_ext }}
83+
langcodec-${{ github.ref_name }}-${{ matrix.target }}.${{ matrix.archive_ext }}.sha256
84+
85+
release:
86+
name: Publish GitHub Release
87+
runs-on: ubuntu-24.04
88+
needs: build
89+
90+
steps:
91+
- name: Download packaged artifacts
92+
uses: actions/download-artifact@v4
93+
with:
94+
path: dist
95+
merge-multiple: true
96+
97+
- name: Publish release and upload binaries
98+
uses: softprops/action-gh-release@v2
99+
with:
100+
generate_release_notes: true
101+
files: dist/*

CONTRIBUTING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ When reporting issues:
132132

133133
1. Update version numbers in `Cargo.toml` files
134134
2. Update CHANGELOG.md
135-
3. Create a release tag
136-
4. Publish to crates.io
135+
3. Create and push a release tag like `v0.10.0`
136+
4. GitHub Actions will build release binaries and attach them to the GitHub Release automatically
137+
5. Publish to crates.io
137138

138139
Thank you for contributing to langcodec!

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ More library details live in [langcodec/README.md](langcodec/README.md).
197197

198198
## Current Status
199199

200-
The current release is `0.9.1` on [crates.io](https://crates.io/crates/langcodec). It is already useful in real workflows, but it is still a `0.x` project, so APIs and behavior may continue to evolve.
200+
The current release is `0.10.0` on [crates.io](https://crates.io/crates/langcodec). It is already useful in real workflows, but it is still a `0.x` project, so APIs and behavior may continue to evolve.
201201

202202
## Contributing
203203

langcodec-cli/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "langcodec-cli"
3-
version = "0.9.1"
3+
version = "0.10.0"
44
edition = "2024"
55
description = "A universal CLI tool for converting and inspecting localization files (Apple, Android, CSV, etc.)"
66
license = "MIT"
@@ -12,7 +12,7 @@ categories = ["command-line-utilities", "internationalization", "localization"]
1212
documentation = "https://docs.rs/langcodec-cli"
1313

1414
[dependencies]
15-
langcodec = { path = "../langcodec", version = "0.9.1" }
15+
langcodec = { path = "../langcodec", version = "0.10.0" }
1616
clap = { version = "4", features = ["derive"] }
1717
clap_complete = "4"
1818
unicode-width = "0.2.0"

langcodec/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "langcodec"
3-
version = "0.9.1"
3+
version = "0.10.0"
44
edition = "2024"
55
description = "Universal localization file toolkit for Rust. Supports Apple, Android, and CSV formats."
66
license = "MIT"

0 commit comments

Comments
 (0)