Skip to content

Commit 0cdf0b3

Browse files
author
Release Manager
committed
gh-36438: .github/workflows/dist.yml: Create release on release tag <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> We extend our workflow dist.yml, which gets run on every release tag, to do the following: - For stable releases (no beta, no rc), when run on sagemath/sage, it automatically creates a Release. (This saves a few clicks by maintainers on each release.) - It uploads the sdist (the 1.2GB file which contains upstream tarballs for all standard packages) as a Release Asset. - It uploads the upstream tarballs as Release Assets. They will be used by the Sage distribution after #36435 Example of the run: https://github.com/mkoeppe/sage/actions/runs/6464035205/job/17549159925 (where I changed the condition from sagemath/sage to mkoeppe/sage), leading to the example release https://github.com/mkoeppe/sage/releases/tag/10.2.beta007 <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #36438 Reported by: Matthias Köppe Reviewer(s): Dima Pasechnik
2 parents 12069d0 + 8ee6738 commit 0cdf0b3

File tree

1 file changed

+33
-5
lines changed

1 file changed

+33
-5
lines changed

.github/workflows/dist.yml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ jobs:
1818

1919
release_dist:
2020

21-
# This job, in contrast to "dist" in ci-macos.yml,
22-
# does not use "configure --enable-download-from-upstream-url"
23-
# (the default since #32390).
21+
# This job first checks whether "configure --enable-download-from-upstream-url"
22+
# (the default since #32390) is needed.
2423
#
2524
# In this way, we check that all necessary package tarballs
2625
# have already been uploaded to the Sage server at the time
@@ -37,13 +36,42 @@ jobs:
3736
run: |
3837
sudo DEBIAN_FRONTEND=noninteractive apt-get update
3938
sudo DEBIAN_FRONTEND=noninteractive apt-get install $(build/bin/sage-get-system-packages debian _bootstrap)
40-
- name: make dist
39+
- name: make dist (--disable-download-from-upstream-url)
4140
run: |
4241
./bootstrap -D && ./configure --disable-download-from-upstream-url && make dist
42+
env:
43+
MAKE: make -j8
44+
- name: make dist (--enable-download-from-upstream-url)
45+
if: failure()
46+
run: |
47+
./configure && make dist
48+
env:
49+
MAKE: make -j8
4350
- uses: actions/upload-artifact@v3
51+
if: success() || failure()
52+
with:
53+
path: |
54+
dist/*.tar.gz
55+
upstream
56+
name: release_dist
57+
58+
release:
59+
60+
needs: release_dist
61+
runs-on: ubuntu-latest
62+
if: (success() || failure()) && github.repository == 'sagemath/sage' && startsWith(github.ref, 'refs/tags/') && !contains(github.ref, 'beta') && !contains(github.ref, 'rc')
63+
steps:
64+
- uses: actions/download-artifact@v3
4465
with:
45-
path: "dist/*.tar.gz"
4666
name: release_dist
67+
- uses: softprops/action-gh-release@v1
68+
with:
69+
generate_release_notes: true
70+
files: |
71+
dist/*
72+
upstream/*
73+
permissions:
74+
contents: write
4775

4876
sdists_for_pypi:
4977

0 commit comments

Comments
 (0)