Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 26 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ jobs:
name: gdscript-formatter-${{ github.ref_name }}-windows-aarch64.exe

runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6.0.2

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

# Build either with cross or cargo, depending on the target.
- name: Build binary
Expand Down Expand Up @@ -80,32 +78,31 @@ jobs:
shell: bash

- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7.0.1
with:
name: ${{ matrix.name }}
path: ${{ matrix.name }}.zip
if-no-files-found: error
retention-days: 10

package-godot-addon:
name: Package the Godot add-on
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Create godot-addon.zip
run: |
zip -r godot-addon.zip addons/
run: zip -r godot-addon.zip addons/
shell: bash

- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: godot-addon
path: godot-addon.zip
if-no-files-found: error
retention-days: 10

publish-release:
name: Publish release
Expand All @@ -115,25 +112,30 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
if: ${{ success() }}
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
path: artifacts
- name: Create/Update Release
uses: softprops/action-gh-release@v2
with:
name: GDScript formatter ${{ github.ref_name }}
body: |
A fast code formatter for GDScript in Godot 4.
merge-multiple: true

- name: Create Release
run: |
gh release create "${{ github.ref_name }}" \
--verify-tag \
--draft \
--title "GDScript formatter ${{ github.ref_name }}" \
--notes "A fast code formatter for GDScript in Godot 4.

You can learn how to install, use, configure, and integrate the formatter into your workflow on this page:

https://www.gdquest.com/library/gdscript_formatter/
files: |
artifacts/**/*.zip
draft: false
prerelease: false
https://www.gdquest.com/library/gdscript_formatter/"

gh release upload "${{ github.ref_name }}" artifacts/*.zip
gh release edit "${{ github.ref_name }}" --draft=false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
11 changes: 8 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ jobs:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v4
- name: checkout
uses: actions/checkout@v6.0.2

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache Dependencies
uses: actions/cache@v5.0.5
with:
path: |
~/.cargo/registry
Expand Down