name: Draft JOSS Paper

on:
  push:
    paths:
      - 'paper.md'
      - 'paper.bib'
  pull_request:
    paths:
      - 'paper.md'
      - 'paper.bib'

jobs:
  paper:
    runs-on: ubuntu-latest
    name: Compile JOSS Paper
    steps:
      - uses: actions/checkout@v4

      - uses: openjournals/openjournals-draft-action@master
        with:
          journal: joss
          paper-path: paper.md

      - uses: actions/upload-artifact@v4
        with:
          name: paper
          path: paper.pdf
