Skip to content

chore(release): prepare for v1.0.0 #9

chore(release): prepare for v1.0.0

chore(release): prepare for v1.0.0 #9

Workflow file for this run

name: Release
on:
workflow_dispatch:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
build:
uses: ./.github/workflows/build.yml
release:
name: Release
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Display structure of downloaded files
run: ls -lR
working-directory: artifacts
- name: Prepare release artifacts
run: |
mkdir -p target
for platform in $(cd artifacts; ls | sed 's/^tsdl\.//'); do
exe=$(ls artifacts/tsdl.$platform/tsdl*)
gzip --stdout --name $exe > target/tsdl-$platform.gz
done
rm -rf artifacts
ls -l target/
- name: Install git-cliff
uses: taiki-e/install-action@git-cliff
- name: Generate changelog
run: git-cliff -vv --latest --strip header --output CHANGES.md
- name: Create release
uses: softprops/action-gh-release@v2
with:
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
fail_on_unmatched_files: true
files: |
target/tsdl-*.gz
body_path: CHANGES.md
crates_io:
name: Publish CLI to Crates.io
runs-on: ubuntu-latest
needs: release
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Publish crates to Crates.io
uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}