-
Notifications
You must be signed in to change notification settings - Fork 12
36 lines (30 loc) · 979 Bytes
/
zenodo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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}`);