Skip to content

Accept paper

Accept paper #3

Workflow file for this run

name: Accept paper
on:
workflow_dispatch:
inputs:
repository_url:
description: 'URL of the repository containing the paper file'
required: true
branch:
description: 'Git branch where the paper Markdown file is'
required: false
issue_id:
description: 'The issue number of the submission'
required: true
add_labels:
description: 'Labels to add to the issue after successful run'
required: false
default: ''
jobs:
acceptance-and-publishing:
name: ${{ format('Accepting paper in issue {0}', github.event.inputs.issue_id) }}
runs-on: ubuntu-latest
env:
GH_ACCESS_TOKEN: ${{ secrets.BOT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
GH_REPO: JuliaCon/proceedings-review
ISSUE_ID: ${{ github.event.inputs.issue_id }}
DEFAULT_ERROR: ":warning: Couldn't acccept/publish paper. [An error happened](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}?check_suite_focus=true)."
steps:
- name: Compile Paper
id: generate-files
uses: openjournals/gh-action-juliacon-pdf-generation@main
with:
repository_url: ${{ github.event.inputs.repository_url }}
branch: ${{ github.event.inputs.branch }}
issue_id: ${{ github.event.inputs.issue_id }}
- name: Upload files to papers repo
id: upload-files
uses: xuanxu/upload-files-action@main
with:
papers_repo: JuliaCon/proceedings-papers
branch_prefix: jcon
issue_id: ${{ github.event.inputs.issue_id }}
pdf_path: ${{ steps.generate-files.outputs.pdf_path}}
crossref_path: ${{ steps.generate-files.outputs.crossref_path}}
- name: Create and Merge Pull Request
id: pull-request
uses: xuanxu/deposit-pull-request-action@main
with:
papers_repo: JuliaCon/proceedings-papers
papers_repo_main_branch: master
branch_prefix: jcon
issue_id: ${{ github.event.inputs.issue_id }}
bot_token: ${{ secrets.BOT_TOKEN }}
mode: deposit
- name: Deposit with Crossref
uses: xuanxu/deposit-with-crossref-action@main
with:
crossref_filepath: ${{ steps.generate-files.outputs.crossref_path}}
crossref_username: ${{ secrets.CROSSREF_USERNAME }}
crossref_password: ${{ secrets.CROSSREF_PASSWORD }}
- name: Deposit with JCon
id: oj-deposit
uses: xuanxu/deposit-with-openjournals-action@main
with:
journal_alias: jcon
journal_secret: ${{ secrets.JCON_SECRET }}
issue_id: ${{ github.event.inputs.issue_id }}
paper_path: ${{ steps.generate-files.outputs.paper_file_path}}
- name: Sleep for 300 seconds
run: sleep 300
shell: bash
- name: Citation.cff file info
uses: xuanxu/citation-file-action@main
with:
citation_file_path: ${{ steps.generate-files.outputs.citation_file_path}}
issue_id: ${{ github.event.inputs.issue_id }}
reviews_repo: JuliaCon/proceedings-review
gh_token: ${{ secrets.BOT_TOKEN }}
- name: Post to social media
uses: xuanxu/acceptance-tweet-action@main
with:
journal_name: "JCON"
paper_title: ${{ steps.generate-files.outputs.paper_title}}
paper_doi: ${{steps.oj-deposit.outputs.paper_doi}}
twitter_consumer_key: ${{ secrets.TWITTER_CONSUMER_KEY }}
twitter_consumer_secret: ${{ secrets.TWITTER_CONSUMER_SECRET }}
twitter_access_token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
twitter_access_token_secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
twitter_user: ${{ secrets.TWITTER_USER }}
mastodon_access_token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
mastodon_instance_url: ${{ secrets.MASTODON_INSTANCE_URL }}
mastodon_user: ${{ secrets.MASTODON_USER }}
reviews_repo: JuliaCon/proceedings-review
issue_id: ${{ github.event.inputs.issue_id }}
gh_token: ${{ secrets.BOT_TOKEN }}
- name: Reply message
if: ${{ success() }}
run: |
gh issue comment ${{ github.event.inputs.issue_id }} --body "🚨🚨🚨 **THIS IS NOT A DRILL, YOU HAVE JUST ACCEPTED A PAPER INTO JCON!** 🚨🚨🚨
Here's what you must now do:
0. Check final PDF and Crossref metadata that was deposited :point_right: ${{steps.pull-request.outputs.pr_url}}
1. Wait five minutes, then verify that the paper DOI resolves [https://doi.org/${{steps.oj-deposit.outputs.paper_doi}}](https://doi.org/${{steps.oj-deposit.outputs.paper_doi}})
2. If everything looks good, then close this review issue.
3. Party like you just published a paper! πŸŽ‰πŸŒˆπŸ¦„πŸ’ƒπŸ‘»πŸ€˜
Any issues? Notify your editorial technical team..."
- name: Labeling
if: ${{ success() && github.event.inputs.add_labels != '' }}
run: gh issue edit ${{ github.event.inputs.issue_id }} --add-label ${{ github.event.inputs.add_labels }}
- name: Error message
if: ${{ failure() && env.CUSTOM_ERROR_STATUS != 'sent' }}
run: |
gh issue comment ${{ github.event.inputs.issue_id }} --body "${{ env.DEFAULT_ERROR }} ${{ env.CUSTOM_ERROR }}"