opening-hours 2.1.2

A parser and evaluation tool for the opening_hours fields in OpenStreetMap.
Documentation
name: Deploy Crates

on:
  - push
  - pull_request

jobs:
  deploy-rust:
    runs-on: ubuntu-latest

    env:
      PACKAGES: >-
        -p compact-calendar
        -p opening-hours-syntax
        -p opening-hours

    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable

      - name: Dry run
        run: cargo publish ${{ env.PACKAGES }} --dry-run

      - name: Login to crates.io
        run: cargo login $TOKEN
        if: github.ref == 'refs/heads/master'
        env:
          TOKEN: ${{ secrets.CRATES_IO_TOKEN }}

      - name: Publish to crates.io
        run: cargo publish ${{ env.PACKAGES }}
        if: github.ref == 'refs/heads/master'