Skip to content

Commit e98a021

Browse files
chore: simplify and clean up CI, pin dependency versions, swap a community dependency for the official gh program
* chore: update GitHub Actions to Node 24 versions * Update test.yml * chore: update release workflow and dependencies - replace softprops/action-gh-release with gh CLI for release creation and upload - switch actions/checkout from v5 to v6 - reduce unnecessary write permissions in build and package jobs - enable artifact merge-multiple in download step - remove conditional success check from release job * chore: remove unnecessary permissions and set artifact retention * chore: pin action versions as well as cross version --------- Co-authored-by: Nathan Lovato <12694995+NathanLovato@users.noreply.github.com>
1 parent 79aa6da commit e98a021

2 files changed

Lines changed: 34 additions & 27 deletions

File tree

.github/workflows/release.yml

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,9 @@ jobs:
3434
name: gdscript-formatter-${{ github.ref_name }}-windows-aarch64.exe
3535

3636
runs-on: ${{ matrix.os }}
37-
permissions:
38-
contents: write
3937
steps:
4038
- name: Checkout
41-
uses: actions/checkout@v5
39+
uses: actions/checkout@v6.0.2
4240

4341
- name: Install Rust
4442
uses: dtolnay/rust-toolchain@stable
@@ -49,7 +47,7 @@ jobs:
4947
# it for other architectures and OSes than the build runner's.
5048
- name: Install cross
5149
if: matrix.os == 'ubuntu-latest' && matrix.target != 'x86_64-unknown-linux-gnu'
52-
run: cargo install cross --git https://github.com/cross-rs/cross
50+
run: cargo install cross --version 0.2.5
5351

5452
# Build either with cross or cargo, depending on the target.
5553
- name: Build binary
@@ -80,32 +78,31 @@ jobs:
8078
shell: bash
8179

8280
- name: Upload artifact
83-
uses: actions/upload-artifact@v4
81+
uses: actions/upload-artifact@v7.0.1
8482
with:
8583
name: ${{ matrix.name }}
8684
path: ${{ matrix.name }}.zip
8785
if-no-files-found: error
86+
retention-days: 10
8887

8988
package-godot-addon:
9089
name: Package the Godot add-on
9190
runs-on: ubuntu-latest
92-
permissions:
93-
contents: write
9491
steps:
9592
- name: Checkout
96-
uses: actions/checkout@v5
93+
uses: actions/checkout@v6
9794

9895
- name: Create godot-addon.zip
99-
run: |
100-
zip -r godot-addon.zip addons/
96+
run: zip -r godot-addon.zip addons/
10197
shell: bash
10298

10399
- name: Upload artifact
104-
uses: actions/upload-artifact@v4
100+
uses: actions/upload-artifact@v7
105101
with:
106102
name: godot-addon
107103
path: godot-addon.zip
108104
if-no-files-found: error
105+
retention-days: 10
109106

110107
publish-release:
111108
name: Publish release
@@ -115,25 +112,30 @@ jobs:
115112
runs-on: ubuntu-latest
116113
permissions:
117114
contents: write
118-
if: ${{ success() }}
119115
steps:
116+
- name: Checkout
117+
uses: actions/checkout@v6
118+
120119
- name: Download artifacts
121-
uses: actions/download-artifact@v4
120+
uses: actions/download-artifact@v8
122121
with:
123122
path: artifacts
124-
- name: Create/Update Release
125-
uses: softprops/action-gh-release@v2
126-
with:
127-
name: GDScript formatter ${{ github.ref_name }}
128-
body: |
129-
A fast code formatter for GDScript in Godot 4.
123+
merge-multiple: true
124+
125+
- name: Create Release
126+
run: |
127+
gh release create "${{ github.ref_name }}" \
128+
--verify-tag \
129+
--draft \
130+
--title "GDScript formatter ${{ github.ref_name }}" \
131+
--notes "A fast code formatter for GDScript in Godot 4.
130132
131133
You can learn how to install, use, configure, and integrate the formatter into your workflow on this page:
132134
133-
https://www.gdquest.com/library/gdscript_formatter/
134-
files: |
135-
artifacts/**/*.zip
136-
draft: false
137-
prerelease: false
135+
https://www.gdquest.com/library/gdscript_formatter/"
136+
137+
gh release upload "${{ github.ref_name }}" artifacts/*.zip
138+
gh release edit "${{ github.ref_name }}" --draft=false
138139
env:
139140
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141+
shell: bash

.github/workflows/test.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,14 @@ jobs:
1414
name: Run tests
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v5
18-
- uses: dtolnay/rust-toolchain@stable
19-
- uses: actions/cache@v4
17+
- name: checkout
18+
uses: actions/checkout@v6.0.2
19+
20+
- name: Install Rust
21+
uses: dtolnay/rust-toolchain@stable
22+
23+
- name: Cache Dependencies
24+
uses: actions/cache@v5.0.5
2025
with:
2126
path: |
2227
~/.cargo/registry

0 commit comments

Comments
 (0)