Skip to content

TARDIS v2024.05.05

TARDIS v2024.05.05 #61

Workflow file for this run

# For more information about TARDIS pipelines, please refer to:
#
# https://tardis-sn.github.io/tardis/contributing/development/continuous_integration.html
name: post-release
on:
release:
types: [published]
workflow_dispatch: # manual trigger
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
repository: tardis-sn/tardis
token: ${{ secrets.BOT_TOKEN }}
fetch-depth: 0
- name: Install github-changes
run: sudo npm install -g github-changes
- name: Update changelog
run: github-changes -o tardis-sn -r tardis --only-pulls --use-commit-body -f CHANGELOG.md -k ${{ secrets.BOT_TOKEN }}
- uses: actions/upload-artifact@v3
with:
name: changelog
path: CHANGELOG.md
citation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Wait for Zenodo webhook
run: sleep 180
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install doi2cff
run: pip install git+https://github.com/citation-file-format/doi2cff
- name: Update CITATION.cff
run: |
rm CITATION.cff
doi2cff init 10.5281/zenodo.592480
- uses: actions/upload-artifact@v3
with:
name: citation
path: CITATION.cff
credits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Wait for Zenodo webhook
run: sleep 180
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install rst-include
run: pip install rst-include==2.1.2.2 requests==2.27.1
- name: Update README.rst
run: python .ci-helpers/update_credits.py
- uses: actions/upload-artifact@v3
with:
name: credits
path: |
README.rst
docs/resources/credits.rst
pull_request:
needs: [changelog, citation, credits]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v3
with:
path: /tmp
- name: Copy files to repository
run: |
cp /tmp/changelog/CHANGELOG.md .
cp /tmp/citation/CITATION.cff .
cp -r /tmp/credits/* .
- name: Get current date
run: echo "DATE=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
- uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.BOT_TOKEN }}
committer: TARDIS Bot <tardis.sn.bot@gmail.com>
author: TARDIS Bot <tardis.sn.bot@gmail.com>
branch: post-release-${{ env.DATE }}
base: master
push-to-fork: tardis-bot/tardis
commit-message: Automated changes for post-release ${{ env.DATE }}
title: Post-release ${{ env.DATE }}
body: |
*\*beep\* \*bop\**
Hi, human.
These are the changes required after the latest TARDIS release.
> :warning: **Warning:**
>
> The `post_release` workflow waits for a webhook and then updates the citation files. If the file is not modified by this pull request, please check the latest release on [Zenodo's website](https://zenodo.org/record/592480), close this pull request, and [manually run the workflow](https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow).
>
> This pull request should be auto-merged.
labels: automated, build-docs
team-reviewers: tardis-infrastructure
id: create-pr
- name: Wait for pull request
run: sleep 30
- name: Approve pull request (I)
run: gh pr review ${{ steps.create-pr.outputs.pull-request-number }} --approve
env:
GITHUB_TOKEN: ${{ secrets.INFRASTRUCTURE_COORDINATOR_TOKEN }}
if: steps.create-pr.outputs.pull-request-operation == 'created'
- name: Approve pull request (II)
run: gh pr review ${{ steps.create-pr.outputs.pull-request-number }} --approve
env:
GITHUB_TOKEN: ${{ secrets.CORE_COORDINATOR_TOKEN }}
if: steps.create-pr.outputs.pull-request-operation == 'created'
- name: Enable automerge
uses: peter-evans/enable-pull-request-automerge@v2
with:
token: ${{ secrets.INFRASTRUCTURE_COORDINATOR_TOKEN }}
pull-request-number: ${{ steps.create-pr.outputs.pull-request-number }}
merge-method: squash
if: steps.create-pr.outputs.pull-request-operation == 'created'