Skip to content

👷 ci(github action): update github action release script #14

👷 ci(github action): update github action release script

👷 ci(github action): update github action release script #14

Workflow file for this run

name: Release
permissions:
contents: write
on:
push:
tags:
- v[0-9]+.*
jobs:
create-release:
name: create-release job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: generate changelog
uses: orhun/git-cliff-action@v2
id: git-cliff
with:
config: cliff.toml
args: -vv --latest
env:
OUTPUT: CHANGELOG.md
- name: create release
uses: ncipollo/release-action@v1
with:
body: ${{ steps.git-cliff.outputs.content }}
token: ${{ secrets.GITHUB_TOKEN }}
upload-assets:
needs: create-release
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Get binary name
uses: dangdennis/toml-action@v1.3.0
id: read_cargo_toml
with:
file: "Cargo.toml"
field: "package.name"
- uses: taiki-e/upload-rust-binary-action@v1
with:
# (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload.
# Note that glob pattern is not supported yet.
bin: ${{ steps.read_cargo_toml.outputs.value }}
# (optional) Archive name (non-extension portion of filename) to be uploaded.
# [default value: $bin-$target]
# [possible values: the following variables and any string]
# variables:
# - $bin - Binary name (non-extension portion of filename).
# - $target - Target triple.
# - $tag - Tag of this release.
# When multiple binary names are specified, default archive name or $bin variable cannot be used.
archive: $bin-$tag-$target
# (optional) On which platform to distribute the `.tar.gz` file.
# [default value: unix]
# [possible values: all, unix, windows, none]
tar: unix
# (optional) On which platform to distribute the `.zip` file.
# [default value: windows]
# [possible values: all, unix, windows, none]
zip: windows
# Comma-separated list of algorithms to be used for checksum (sha256, sha512, sha1, or md5)
checksum: sha256
# Comma-separated list of additional files to be included to the archive
include: README.md,LICENSE
# (required) GitHub token for uploading assets to GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}