napmap 0.1.2

Async HashMap that halts requester tasks until the requested data is accessible
Documentation
name: Continuous Deployment

on:
  push:
    tags:
      - "*.*.*"

# We need this to be able to create releases.
permissions:
    contents: write

jobs:
  generate-changelog:
    name: Generate changelog
    runs-on: ubuntu-latest
    timeout-minutes: 10
    outputs:
      release_body: ${{ steps.git-cliff.outputs.content }}
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Generate a changelog
        uses: orhun/git-cliff-action@main
        id: git-cliff
        with:
          config: cliff.toml
          args: --latest --no-exec --github-repo ${{ github.repository }}
        env:
          OUTPUT: CHANGES.md

  github-release:
    name: Github Release
    runs-on: ubuntu-latest
    needs: generate-changelog
    timeout-minutes: 10
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Create GitHub Release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        shell: bash
        run: |
          release_body="${{ needs.generate-changelog.outputs.release_body }}"
          gh release create ${{ github.ref_name }} --verify-tag --notes "$release_body"

  publish-crates-io:
    name: Publish on crates.io
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - name: Checkout sources
        uses: actions/checkout@v2

      - name: Install stable toolchain
        uses: actions-rs/toolchain@v1
        with:
            profile: minimal
            toolchain: stable
            override: true

      - run: cargo publish --token ${CRATES_TOKEN}
        env:
            CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}