Skip to content

Release version 1.0.3 #27

Release version 1.0.3

Release version 1.0.3 #27

Workflow file for this run

name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.platform }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- platform: linux-x86_64
runner: ubuntu-latest
- platform: linux-arm64
runner: ubuntu-24.04-arm
- platform: darwin-arm64
runner: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install mise
uses: jdx/mise-action@v4
- name: Install Python and tools
run: mise install
- name: Build binary
run: mise run build
- name: Package tarball
env:
VERSION_NO_V: ${{ github.ref_name }}
PLATFORM: ${{ matrix.platform }}
run: |
set -euo pipefail
STAGE_DIR="$(mktemp -d)"
mkdir -p "$STAGE_DIR/openspec-extended/bin"
cp dist/openspec-extended "$STAGE_DIR/openspec-extended/bin/openspec-extended"
chmod 0755 "$STAGE_DIR/openspec-extended/bin/openspec-extended"
ASSET_NAME="openspec-extended-v${VERSION_NO_V#v}-${PLATFORM}.tar.gz"
tar -C "$STAGE_DIR" -czf "$ASSET_NAME" openspec-extended
sha256sum "$ASSET_NAME" > SHA256SUMS
rm -rf "$STAGE_DIR"
- name: Upload build artifacts
uses: actions/upload-artifact@v7
with:
name: binary-${{ matrix.platform }}
path: |
*.tar.gz
SHA256SUMS
if-no-files-found: error
release:
name: Publish release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Download all build artifacts
uses: actions/download-artifact@v8
with:
path: artifacts
- name: Combine SHA256SUMS
run: |
set -euo pipefail
: > SHA256SUMS
for sums_file in artifacts/*/SHA256SUMS; do
cat "$sums_file" >> SHA256SUMS
done
sort -u -o SHA256SUMS SHA256SUMS
cat SHA256SUMS
- name: Publish GitHub release
uses: softprops/action-gh-release@v3
with:
generate_release_notes: true
files: |
artifacts/**/*.tar.gz
SHA256SUMS