Skip to content

feat: add changelog and update version to 1.1.0 #3

feat: add changelog and update version to 1.1.0

feat: add changelog and update version to 1.1.0 #3

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
tag:
description: "Tag to release"
required: true
default: "latest"
push:
tags:
- "*.*.*"
permissions:
contents: write
jobs:
build:
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
artifact: cgen-linux-amd64
- target: x86_64-apple-darwin
os: macos-latest
artifact: cgen-macos-amd64
- target: aarch64-apple-darwin
os: macos-latest
artifact: cgen-macos-arm64
- target: x86_64-pc-windows-msvc
os: windows-latest
artifact: cgen-windows-amd64.exe
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build
run: cargo build --release --target ${{ matrix.target }}
- name: Rename binary (Unix)
if: runner.os != 'Windows'
run: |
cp target/${{ matrix.target }}/release/cgen ${{ matrix.artifact }}
- name: Rename binary (Windows)
if: runner.os == 'Windows'
run: |
cp target/${{ matrix.target }}/release/cgen.exe ${{ matrix.artifact }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}
publish-crate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Create Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: artifacts/**/*