-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (65 loc) · 2.36 KB
/
release.yaml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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