twjsrs 0.1.0

(De)serialize TiddlyWiki tiddlers to and from their JSON format.
Documentation
name: Release

on:
  push:
    branches:
    - release*
    tags:
    - 'v*'

env:
  # The NAME makes it easier to copy/paste snippets from other CI configs
  NAME: twjsrs

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3

    - uses: ncipollo/release-action@v1
      if: ${{ startsWith(github.ref, 'refs/tags/v') }}
      with:
        body: "See [CHANGELOG.md](https://github.com/langston-barrett/${NAME}/blob/main/CHANGELOG.md)"
        draft: true
        token: ${{ secrets.GITHUB_TOKEN }}

    - name: Publish to crates.io
      env:
        CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
        # Only push on actual release tags
        PUSH: ${{ startsWith(github.ref, 'refs/tags/v') }}
      run: |
        if [[ ${PUSH} == true ]]; then
          cargo publish --token ${CRATES_IO_TOKEN}
        else
          cargo publish --dry-run --token ${CRATES_IO_TOKEN}
        fi