ci-manager 0.5.2

Parse GitHub/GitLab workflows and do stuff like create issues
Documentation
name: Release

on:
  push:
    tags:
      - '*'
  workflow_dispatch:

defaults:
  run:
    shell: bash

jobs:
    # Adapted from: https://github.com/casey/just/blob/610aa0c52cf8c3d20a79ee641bb9f799ca3027fc/.github/workflows/release.yaml
    release-prebuilt:
      strategy:
        matrix:
          target:
            - x86_64-unknown-linux-musl
            - x86_64-pc-windows-msvc
          include:
            - target: x86_64-unknown-linux-musl
              os: ubuntu-latest
            - target: x86_64-pc-windows-msvc
              os: windows-latest
      runs-on: ${{ matrix.os }}
      steps:
        - uses: actions/checkout@v4
          with:
            fetch-depth: 0
        - name: Install musl-gcc
          if: ${{ matrix.target == 'x86_64-unknown-linux-musl' }}
          run: |
            sudo apt-get update
            sudo apt-get install musl-tools
            musl-gcc --version

        - name: Package
          id: package
          env:
            TARGET: ${{ matrix.target }}
            REF: ${{ github.ref }}
            OS: ${{ matrix.os }}
          run: ./scripts/package.bash
          shell: bash

        - name: Publish Archive
          uses: softprops/action-gh-release@v2.0.4
          if: ${{ startsWith(github.ref, 'refs/tags/') }}
          with:
            draft: false
            files: ${{ steps.package.outputs.archive }}
          env:
            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

        - name: Publish Changelog
          uses: softprops/action-gh-release@v2.0.4
          if: >-
            ${{
              startsWith(github.ref, 'refs/tags/')
              && matrix.target == 'x86_64-unknown-linux-musl'
            }}
          with:
            draft: false
            files: CHANGELOG.md
          env:
            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

    release-crates-io:
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v4
              with:
                fetch-depth: 0
            - uses: extractions/setup-just@v2
            - name: Check version
              run: just --verbose check-version
            - name: Publish
              run: cargo publish --token ${{ secrets.CARGO_PUBLISH_TOKEN }}