mirror of
https://github.com/anthonyoteri/dredge.git
synced 2026-06-05 15:26:53 -04:00
353fd94b55
- Replace deprecated serde_yaml with serde_yml - Remove unused dependencies: serde_toml, xdg - Bump thiserror 1→2, toml 0.8→1.0, reqwest 0.12.3→0.12 (latest), clap 4.4→4.6, tokio 1.32→1.52, and all other deps to latest - Raise rust-version minimum from 1.72 to 1.80 - Fix description typo: 'interracting' → 'interacting' - Bump version to 1.2.0 - Update release workflow action versions
116 lines
3.1 KiB
YAML
116 lines
3.1 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v[0-9]+.[0-9]+.[0-9]+*"
|
|
|
|
jobs:
|
|
create_release:
|
|
name: Create release
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
outputs:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
steps:
|
|
- name: Create release
|
|
id: create_release
|
|
uses: ncipollo/release-action@v1.21.0
|
|
|
|
build-docs:
|
|
name: Build documentation
|
|
needs: create_release
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Rust Toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: stable
|
|
components: rust-docs
|
|
|
|
- name: Cache build dependencies
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Run cargo doc
|
|
run:
|
|
cargo doc
|
|
--bin=dredge
|
|
--no-deps
|
|
--all-features
|
|
--document-private-items
|
|
--release
|
|
|
|
- name: Archive the Docs
|
|
run:
|
|
tar --directory target/doc -czf
|
|
dredge-${{ github.ref_name}}-docs.tar.gz
|
|
dredge
|
|
|
|
- name: Upload documentation assets
|
|
uses: shogo82148/actions-upload-release-asset@v1.10.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
|
asset_name: dredge-${{ github.ref_name }}-docs.tar.gz
|
|
asset_path: dredge-${{ github.ref_name }}-docs.tar.gz
|
|
asset_content_type: application/gzip
|
|
|
|
release_assets:
|
|
name: Release assets
|
|
needs: create_release
|
|
runs-on: ${{ matrix.config.os }}
|
|
permissions:
|
|
contents: write
|
|
strategy:
|
|
matrix:
|
|
config:
|
|
- os: ubuntu-latest
|
|
platform: linux
|
|
arch: x86_64
|
|
ext: ''
|
|
- os: macos-latest
|
|
platform: macos
|
|
arch: x86_64
|
|
ext: ''
|
|
- os: windows-latest
|
|
platform: win
|
|
arch: x86_64
|
|
ext: .exe
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Rust Toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: stable
|
|
|
|
- name: Cache build dependencies
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Run cargo build
|
|
run: cargo build --release
|
|
|
|
- name: Create release assets
|
|
run:
|
|
tar --directory target/release -czf
|
|
dredge-${{ github.ref_name }}-${{ matrix.config.platform }}.${{ matrix.config.arch }}.tar.gz
|
|
dredge${{ matrix.config.ext }}
|
|
|
|
- name: Upload release assets
|
|
uses: shogo82148/actions-upload-release-asset@v1.10.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
|
asset_name: dredge-${{ github.ref_name }}-${{ matrix.config.platform }}.${{ matrix.config.arch }}.tar.gz
|
|
asset_path: dredge-${{ github.ref_name }}-${{ matrix.config.platform }}.${{ matrix.config.arch }}.tar.gz
|
|
asset_content_type: application/gzip
|