File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 63
63
--user scipy-wheels-nightly \
64
64
--skip-existing \
65
65
dist/matplotlib-*.whl
66
+
67
+ - name : Remove old uploads to save space
68
+ shell : bash
69
+ run : |
70
+ N_LATEST_UPLOADS=5
71
+
72
+ # Remove all _but_ the last "${N_LATEST_UPLOADS}" package versions
73
+ # N.B.: `anaconda show` places the newest packages at the bottom of the output
74
+ # of the 'Versions' section and package versions are preceded with a ' + '.
75
+ anaconda show scipy-wheels-nightly/matplotlib &> >(grep '+') | \
76
+ sed 's/.* + //' | \
77
+ head --lines "-${N_LATEST_UPLOADS}" > remove-package-versions.txt
78
+
79
+ if [ -s remove-package-versions.txt ]; then
80
+ while LANG=C IFS= read -r package_version ; do
81
+ anaconda --token ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }} remove \
82
+ --force \
83
+ "scipy-wheels-nightly/matplotlib/${package_version}"
84
+ done <remove-package-versions.txt
85
+ fi
You can’t perform that action at this time.
0 commit comments