Skip to content

Release in Pacific time #31

Release in Pacific time

Release in Pacific time #31

Workflow file for this run

name: Download and release devstats data bundle
on: push
# schedule:
# - cron: "0 1 * * 0" # 01:00 on Sundays, https://crontab.guru/#0_1_*_*_0
permissions:
contents: write # to make release
jobs:
devstats-release:
runs-on: ubuntu-latest
steps:
- uses: stefanv/devstats-query-action@main
with:
repos: |
- scientific-python/spin
- scientific-python/lazy-loader
# - numpy/numpy
# - scipy/scipy
# - matplotlib/matplotlib
# - pandas-dev/pandas
# - scikit-learn/scikit-learn
# - scikit-image/scikit-image
# - networkx/networkx
# - astropy/astropy
# - sunpy/sunpy
token: ${{ secrets.GITHUB_TOKEN }}
artifact-name: devstats-scientific-python
- uses: actions/download-artifact@v4
with:
name: devstats-scientific-python
- name: Set variables
shell: bash
run: |
ISODATE=$(TZ=US/Pacific date +"%Y-%m-%d")
echo "ISODATE=$ISODATE" >> $GITHUB_ENV
echo "QUERY_FILENAME=$ISODATE-queries.tar.xz" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
path: devstats-data
- name: Push date as tag
shell: bash
run: >-
(cd devstats-data &&
git config user.name github-actions &&
git config user.email github-actions@github.com &&
git tag -a $ISODATE -m "Release $ISODATE" &&
git push origin $ISODATE)
- uses: actions/checkout@v4
with:
repository: scientific-python/devstats
path: devstats
- name: Bundle queries
shell: bash
run: |
tar cfJ $QUERY_FILENAME --strip-components=3 devstats/devstats/queries/*
- name: Release
uses: softprops/action-gh-release@v2
with:
body: |
This is the ${{ env.ISODATE }} snapshot of developer statistics for [Scientific Python](https://scientific-python.org) [core projects](https://scientific-python.org/specs/core-projects/).
You can generate a report from this data using [devstats](https://github.com/scientific-python/devstats).
`${{ env.QUERY_FILENAME }}` contains the queries used for this
release.
tag_name: ${{ env.ISODATE }}
files: |
*.xz