Skip to content
This repository was archived by the owner on Feb 17, 2026. It is now read-only.

fix(readme): remove big tabs #2

fix(readme): remove big tabs

fix(readme): remove big tabs #2

Workflow file for this run

name: Release
on:
workflow_dispatch:
push:
branches: [ main, master ]
permissions:
contents: write
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.ver.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- id: ver
name: Read version from Cargo.toml
run: |
ver=$(sed -n 's/^version\s*=\s*"\([^"]\+\)"/\1/p' Cargo.toml | head -n1)
if [ -z "$ver" ]; then
echo "Failed to read version"; exit 1; fi
echo "version=$ver" >> $GITHUB_OUTPUT
build:
needs: prepare
strategy:
matrix:
include:
- os: ubuntu-latest
target: linux-x86_64
- os: ubuntu-latest
target: linux-aarch64
- os: macos-latest
target: macos
- os: windows-latest
target: windows-x86_64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build (release, linux-x86_64)
if: matrix.target == 'linux-x86_64'
run: cargo build --release --locked
- name: Package (linux-x86_64)
if: matrix.target == 'linux-x86_64'
run: |
zip -j gmap-linux-x86_64-${{ needs.prepare.outputs.version }}.zip target/release/gmap LICENSE README.md || true
- name: Build (release, linux-aarch64 via cross)
if: matrix.target == 'linux-aarch64'
uses: taiki-e/install-action@v2
with:
tool: cross
- name: Build with cross
if: matrix.target == 'linux-aarch64'
run: cross build --release --locked --target aarch64-unknown-linux-gnu
- name: Package (linux-aarch64)
if: matrix.target == 'linux-aarch64'
run: |
zip -j gmap-linux-aarch64-${{ needs.prepare.outputs.version }}.zip target/aarch64-unknown-linux-gnu/release/gmap LICENSE README.md || true
- name: Build (release, macos)
if: matrix.target == 'macos'
run: cargo build --release --locked
- name: Package (macos)
if: matrix.target == 'macos'
run: |
zip -j gmap-macos-${{ needs.prepare.outputs.version }}.zip target/release/gmap LICENSE README.md || true
- name: Build (release, windows-x86_64)
if: matrix.target == 'windows-x86_64'
run: cargo build --release --locked
- name: Package (windows)
if: matrix.target == 'windows-x86_64'
shell: powershell
run: |
Compress-Archive -Path target/release/gmap.exe, LICENSE, README.md -DestinationPath gmap-windows-x86_64-${{ needs.prepare.outputs.version }}.zip
- name: Upload artifact (linux-x86_64)
if: matrix.target == 'linux-x86_64'
uses: actions/upload-artifact@v4
with:
name: linux-x86_64-zip
path: gmap-linux-x86_64-${{ needs.prepare.outputs.version }}.zip
- name: Upload artifact (linux-aarch64)
if: matrix.target == 'linux-aarch64'
uses: actions/upload-artifact@v4
with:
name: linux-aarch64-zip
path: gmap-linux-aarch64-${{ needs.prepare.outputs.version }}.zip
- name: Upload artifact (macos)
if: matrix.target == 'macos'
uses: actions/upload-artifact@v4
with:
name: macos-zip
path: gmap-macos-${{ needs.prepare.outputs.version }}.zip
- name: Upload artifact (windows)
if: matrix.target == 'windows-x86_64'
uses: actions/upload-artifact@v4
with:
name: windows-x86_64-zip
path: gmap-windows-x86_64-${{ needs.prepare.outputs.version }}.zip
release:
needs: [prepare, build]
runs-on: ubuntu-latest
steps:
- name: Download linux-x86_64 artifact
uses: actions/download-artifact@v4
with:
name: linux-x86_64-zip
path: dist
- name: Download linux-aarch64 artifact
uses: actions/download-artifact@v4
with:
name: linux-aarch64-zip
path: dist
- name: Download macos artifact
uses: actions/download-artifact@v4
with:
name: macos-zip
path: dist
- name: Download windows artifact
uses: actions/download-artifact@v4
with:
name: windows-x86_64-zip
path: dist
- name: Create GitHub Release and upload assets
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ needs.prepare.outputs.version }}
name: gmap v${{ needs.prepare.outputs.version }}
files: |
dist/gmap-linux-x86_64-${{ needs.prepare.outputs.version }}.zip
dist/gmap-linux-aarch64-${{ needs.prepare.outputs.version }}.zip
dist/gmap-macos-${{ needs.prepare.outputs.version }}.zip
dist/gmap-windows-x86_64-${{ needs.prepare.outputs.version }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}