Actually, a problem with that .gitattributes example is that it affects the behavior of git commands. For example, if I try to compare two commits, files outside of the addons directory are ignored.

Correction. That example uses the export-ignore attribute, which only applies to some git commands. It doesn't affect git diff, so it probably doesn't affect comparing commits in GitHub.

I'm looking into a potential solution: a GitHub Workflow Action.

    DaveTheCoder I'm looking into a potential solution: a GitHub Workflow Action.

    I may need a good storage and collaboration solution for a project soon.

      Tomcat I was able to find a work around by submitting my project as Custom to the Godot Asset Library and using raw links to each of the relevant files in my repo.

        By looking at some examples and experimenting, I succeeded in creating a GitHub Workflow Action that ignores .gitattributes and creates a .zip of the full repository when I create a release.

        A problem is that the .zip has too many levels:
        release-archive.zip
        .... release-archive.zip
        .... .... tmp/
        .... .... .... tmp.YbXGREv3M9/
        .... .... .... .... (repository files)

        .github/workflows/create-release-archive.yml

        name: Create Release Archive
        
        on:
          release:
            types:
              - created
        
        jobs:
          build:
            runs-on: ubuntu-latest
            steps:
            - name: Checkout repository
              uses: actions/checkout@v3
        
            - name: Archive repository
              run: |
                # Create a temporary directory
                TMP_DIR=$(mktemp -d)
        
                # Copy repository contents to the temporary directory, excluding specified files/directories
                rsync -av --exclude={'.git', '.github'} . ${TMP_DIR}
        
                # Create a ZIP archive
                zip -r release-archive.zip ${TMP_DIR}
        
              # Upload the ZIP archive as a GitHub Release asset
            - name: Upload Release Asset
              uses: actions/upload-artifact@v3
              with:
                  name: release-archive.zip
                  path: ./release-archive.zip

        Ideally, I'd like the name of the .zip to use the same convention that GitHub or the Asset Library uses when you download a .zip in the normal way, and for the .zip to contain one top-level directory that has that same name.

        Also, the created .zip is not in an obvious place in the repo's page.

        kitfox I was able to find a work around by submitting my project as Custom to the Godot Asset Library and using raw links to each of the relevant files in my repo.

        Did that take a lot of work? Did you have to add any extra files to the repository?

        Here's the final, working GitHub Workflow script that does everything I wanted. When a new GitHub release is created, it adds a .zip asset to the release page, with a name that indicates the repository name and the version tag, and containing a top level directory with the same name, and the full contents of the repository, excluding the .git* files and directories.

        name: Create Release Archive
        
        on:
          push:
            # Only run this workflow if github.ref_name has the form "x.y.z".
            tags: ["*.*.*"]
        
        jobs:
          build:
            runs-on: ubuntu-latest
            steps:
              - name: Checkout Repository
                uses: actions/checkout@v3
        
                # Repository name, with owner name removed using sed (Stream Editor).
                # Example: "octocat/octorepo" is converted to "octorepo".
              - name: Repository Name
                run: echo REPOSITORY=`echo ${{ github.repository }} | sed s'#.*/\(.*\)#\1#'` >> "$GITHUB_ENV"
        
                # Example: octorepo-1.2.3-full_repository
              - name: Archive Name
                run: echo ARCHIVE="$REPOSITORY"-"${{ github.ref_name }}"-full_repository >> "$GITHUB_ENV"
        
                # Example: octorepo-1.2.3-full_repository.zip
              - name: Make Archive
                run: |
                  # Create subdirectory, which will be archive's top level directory.
                  mkdir "$ARCHIVE"
        
                  # Copy desired files into subdirectory, excluding the subdirectory itself.
                  # rsync is used because it has an --exclude option.
                  rsync --archive --exclude={"$ARCHIVE",.gitignore,.gitattributes,.git,.github} . "$ARCHIVE"
        
                  # Make archive from subdirectory.
                  zip --recurse-paths "$ARCHIVE".zip "$ARCHIVE"
        
              - name: Upload Asset
                uses: softprops/action-gh-release@v1
                with:
                  files: '*.zip'

        If you're a coding beginner, stay away from writing GitHub workflows. It will be a nightmare. 🙂

        probably a typo and 'inisia' is supposed to be 'inicia'? Como inicia would mean 'How to start' or 'How does it start'

          DaveTheCoder I'm guessing they are asking for help on getting started with doing this themselves. As in they might be struggling with the same issue and were hoping you had solved it. But that's just a guess.

          Maybe, but that's like posting "how do I use Godot" as a reply in a detailed discussion here.