|
1 | 1 | name: Release |
2 | 2 |
|
3 | | -# Tag a commit v1.1 (or any v*) and push the tag; this builds the binaries and |
4 | | -# publishes the release. Nothing here can be run by hand against a dirty tree, |
5 | | -# which is the point: what ships is exactly what the tag points at. |
| 3 | +# Publishes a release: verifies both editions, builds the binaries, and creates |
| 4 | +# the GitHub release with them attached. |
| 5 | +# |
| 6 | +# Two ways in. Push a v* tag, or run it by hand with a version -- the manual |
| 7 | +# path is the one this repository uses, because pushing a tag from the agent |
| 8 | +# session is refused with a 403 (the session's grant covers branches, not tag |
| 9 | +# refs). On that path `gh release create` makes the tag itself, with the |
| 10 | +# repository's own token, at the commit the run started from. |
| 11 | +# |
| 12 | +# Nothing gets released past a red suite. |
6 | 13 | on: |
7 | 14 | push: |
8 | 15 | tags: ["v*"] |
9 | 16 | workflow_dispatch: |
10 | 17 | inputs: |
11 | | - tag: |
12 | | - description: "Existing tag to build and publish" |
| 18 | + version: |
| 19 | + description: "Version to publish, e.g. v1.1" |
13 | 20 | required: true |
14 | 21 |
|
15 | 22 | permissions: |
|
24 | 31 | SDL_AUDIODRIVER: dummy |
25 | 32 | steps: |
26 | 33 | - uses: actions/checkout@v4 |
27 | | - with: |
28 | | - ref: ${{ github.event.inputs.tag || github.ref }} |
29 | 34 | - uses: actions/setup-python@v5 |
30 | 35 | with: |
31 | 36 | python-version: "3.11" |
|
56 | 61 | runs-on: ${{ matrix.os }} |
57 | 62 | steps: |
58 | 63 | - uses: actions/checkout@v4 |
59 | | - with: |
60 | | - ref: ${{ github.event.inputs.tag || github.ref }} |
61 | 64 | - uses: actions/setup-python@v5 |
62 | 65 | with: |
63 | 66 | python-version: "3.11" |
|
82 | 85 | runs-on: ubuntu-latest |
83 | 86 | steps: |
84 | 87 | - uses: actions/checkout@v4 |
85 | | - with: |
86 | | - ref: ${{ github.event.inputs.tag || github.ref }} |
87 | 88 | - uses: actions/download-artifact@v4 |
88 | 89 | with: |
89 | 90 | merge-multiple: true |
|
96 | 97 | - name: Publish |
97 | 98 | env: |
98 | 99 | GH_TOKEN: ${{ github.token }} |
99 | | - TAG: ${{ github.event.inputs.tag || github.ref_name }} |
| 100 | + VERSION: ${{ github.event.inputs.version || github.ref_name }} |
100 | 101 | run: | |
101 | | - gh release create "$TAG" \ |
102 | | - --title "NOVA $TAG" \ |
| 102 | + # On a manual run there is no tag yet, and `gh release create` makes |
| 103 | + # one at the commit this ran on. That is the path this repository |
| 104 | + # actually uses: pushing a tag from the agent session is refused with |
| 105 | + # a 403 -- the session's grant covers branches, not tag refs -- so the |
| 106 | + # repository creates its own tag with its own token. |
| 107 | + gh release create "$VERSION" \ |
| 108 | + --target "$GITHUB_SHA" \ |
| 109 | + --title "NOVA $VERSION" \ |
103 | 110 | --notes-file .github/RELEASE_NOTES.md \ |
104 | 111 | NOVA-windows.exe NOVA-linux nova-numworks.zip |
0 commit comments