Skip to content

Automated Zenodo release #234

Automated Zenodo release

Automated Zenodo release #234

Workflow file for this run

name: Automated Zenodo release
on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set release date
id: date
run: |
echo "RELEASE_DATE=$(date '+%Y-%m-%d-%H-%M-%S')" >> $GITHUB_ENV
- name: Create Release
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const release = await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: process.env.RELEASE_DATE,
name: `Release ${process.env.RELEASE_DATE}`,
body: 'Automated release bot to push zenodo',
draft: false,
prerelease: false
});
console.log(`Release created successfully: ${release.data.html_url}`);