-
Notifications
You must be signed in to change notification settings - Fork 0
162 lines (142 loc) · 4.61 KB
/
release.yaml
File metadata and controls
162 lines (142 loc) · 4.61 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: Download and release devstats data bundle
on:
push:
schedule:
- cron: "0 1 * * 0" # 01:00 on Sundays, https://crontab.guru/#0_1_*_*_0
workflow_dispatch:
permissions:
contents: write # to make release
jobs:
download-1:
runs-on: ubuntu-latest
steps:
- uses: scientific-python/devstats-query-action@main
with:
repos: |
- numpy/numpy
token: ${{ secrets.GRAPHQL_TOKEN }}
artifact-name: devstats-scientific-python-1
timezone: US/Pacific
download-2:
runs-on: ubuntu-latest
steps:
- uses: scientific-python/devstats-query-action@main
with:
repos: |
- scipy/scipy
token: ${{ secrets.GRAPHQL_TOKEN }}
artifact-name: devstats-scientific-python-2
timezone: US/Pacific
download-3:
runs-on: ubuntu-latest
steps:
- uses: scientific-python/devstats-query-action@main
with:
repos: |
- pandas-dev/pandas
token: ${{ secrets.GRAPHQL_TOKEN }}
artifact-name: devstats-scientific-python-3
timezone: US/Pacific
download-4:
runs-on: ubuntu-latest
steps:
- uses: scientific-python/devstats-query-action@main
with:
repos: |
- scikit-learn/scikit-learn
token: ${{ secrets.GRAPHQL_TOKEN }}
artifact-name: devstats-scientific-python-4
timezone: US/Pacific
# Skip matplotlib for now, since they don't support personal tokens
# with expiry > 7 days.
#
# download-5:
# runs-on: ubuntu-latest
# steps:
# - uses: scientific-python/devstats-query-action@main
# with:
# repos: |
# - matplotlib/matplotlib
# token: ${{ secrets.GRAPHQL_TOKEN }}
# artifact-name: devstats-scientific-python-5
# timezone: US/Pacific
download-6:
runs-on: ubuntu-latest
steps:
- uses: scientific-python/devstats-query-action@main
with:
repos: |
- scikit-image/scikit-image
- networkx/networkx
token: ${{ secrets.GRAPHQL_TOKEN }}
artifact-name: devstats-scientific-python-6
timezone: US/Pacific
download-7:
runs-on: ubuntu-latest
steps:
- uses: scientific-python/devstats-query-action@main
with:
repos: |
- astropy/astropy
- sunpy/sunpy
token: ${{ secrets.GRAPHQL_TOKEN }}
artifact-name: devstats-scientific-python-7
timezone: US/Pacific
release:
needs:
- download-1
- download-2
- download-3
- download-4
# - download-5
- download-6
- download-7
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
pattern: devstats-scientific-python-*
merge-multiple: true
path: .
- 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 -C ./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, or your own project's data, using [devstats](https://github.com/scientific-python/devstats).
Weekly reports for core projects are available at https://devstats.scientific-python.org
`${{ env.QUERY_FILENAME }}` contains the queries used for this release.
tag_name: ${{ env.ISODATE }}
files: |
*.xz
- name: Rebuild devstats.scientific-python.org
shell: bash
env:
NETLIFY_TRIGGER_URL: ${{ secrets.NETLIFY_TRIGGER_URL }}
run: |
curl -X POST -d {} "$NETLIFY_TRIGGER_URL"