Skip to content

Commit 8429bbe

Browse files
committed
CI: update the release workflow to ensure the build has to complete before creating a release
Close #166
1 parent 9266573 commit 8429bbe

File tree

1 file changed

+29
-18
lines changed

1 file changed

+29
-18
lines changed

.github/workflows/release.yml

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ env:
88
CARGO_TERM_COLOR: always
99

1010
jobs:
11-
build-and-release:
12-
name: Build and release
11+
build-binaries:
12+
name: Build binaries
1313
strategy:
1414
fail-fast: false
1515
matrix:
@@ -79,22 +79,12 @@ jobs:
7979
fi
8080
shell: bash
8181

82-
- name: Create/Update Release
83-
uses: softprops/action-gh-release@v2
82+
- name: Upload artifact
83+
uses: actions/upload-artifact@v4
8484
with:
85-
name: GDScript formatter ${{ github.ref_name }}
86-
body: |
87-
A fast code formatter for GDScript in Godot 4.
88-
89-
You can learn how to install, use, configure, and integrate the formatter into your workflow on this page:
90-
91-
https://www.gdquest.com/library/gdscript_formatter/
92-
files: |
93-
*.zip
94-
draft: false
95-
prerelease: false
96-
env:
97-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
name: ${{ matrix.name }}
86+
path: ${{ matrix.name }}.zip
87+
if-no-files-found: error
9888

9989
package-godot-addon:
10090
name: Package the Godot add-on
@@ -110,6 +100,27 @@ jobs:
110100
zip -r godot-addon.zip addons/
111101
shell: bash
112102

103+
- name: Upload artifact
104+
uses: actions/upload-artifact@v4
105+
with:
106+
name: godot-addon
107+
path: godot-addon.zip
108+
if-no-files-found: error
109+
110+
publish-release:
111+
name: Publish release
112+
needs:
113+
- build-binaries
114+
- package-godot-addon
115+
runs-on: ubuntu-latest
116+
permissions:
117+
contents: write
118+
if: ${{ success() }}
119+
steps:
120+
- name: Download artifacts
121+
uses: actions/download-artifact@v4
122+
with:
123+
path: artifacts
113124
- name: Create/Update Release
114125
uses: softprops/action-gh-release@v2
115126
with:
@@ -121,7 +132,7 @@ jobs:
121132
122133
https://www.gdquest.com/library/gdscript_formatter/
123134
files: |
124-
godot-addon.zip
135+
artifacts/**/*.zip
125136
draft: false
126137
prerelease: false
127138
env:

0 commit comments

Comments
 (0)