github.com/joselitofilho/goreleaser@v0.155.1-0.20210123221854-e4891856c593/www/docs/customization/scoop.md (about)

     1  ---
     2  title: Scoop
     3  ---
     4  
     5  After releasing to GitHub or GitLab, GoReleaser can generate and publish a
     6  _Scoop App Manifest_ into a repository that you have access to.
     7  
     8  The `scoop` section specifies how the manifest should be created. See
     9  the commented example below:
    10  
    11  ```yaml
    12  # .goreleaser.yml
    13  scoop:
    14    # Template for the url which is determined by the given Token (github or gitlab)
    15    # Default for github is "https://github.com/<repo_owner>/<repo_name>/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
    16    # Default for gitlab is "https://gitlab.com/<repo_owner>/<repo_name>/uploads/{{ .ArtifactUploadHash }}/{{ .ArtifactName }}"
    17    # Default for gitea is "https://gitea.com/<repo_owner>/<repo_name>/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
    18    url_template: "http://github.mycompany.com/foo/bar/releases/{{ .Tag }}/{{ .ArtifactName }}"
    19  
    20    # Repository to push the app manifest to.
    21    bucket:
    22      owner: user
    23      name: scoop-bucket
    24      # Optionally a token can be provided, if it differs from the token provided to GoReleaser
    25      token: "{{ .Env.SCOOP_BUCKET_GITHUB_TOKEN }}"
    26  
    27    # Git author used to commit to the repository.
    28    # Defaults are shown.
    29    commit_author:
    30      name: goreleaserbot
    31      email: goreleaser@carlosbecker.com
    32  
    33    # The project name and current git tag are used in the format string.
    34    commit_msg_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}"
    35  
    36    # Your app's homepage.
    37    # Default is empty.
    38    homepage: "https://example.com/"
    39  
    40    # Your app's description.
    41    # Default is empty.
    42    description: "Software to create fast and easy drum rolls."
    43  
    44    # Your app's license
    45    # Default is empty.
    46    license: MIT
    47  
    48    # Persist data between application updates
    49    persist:
    50    - "data"
    51    - "config.toml"
    52  
    53    # An array of commands to be executed before an application is installed.
    54    # Default is empty.
    55    pre_install: ["Write-Host 'Running preinstall command'"]
    56  
    57    # An array of commands to be executed after an application is installed.
    58    # Default is empty.
    59    post_install: ["Write-Host 'Running postinstall command'"]
    60  ```
    61  
    62  By defining the `scoop` section, GoReleaser will take care of publishing the
    63  Scoop app. Assuming that the project name is `drumroll` and the current tag is
    64  `v1.2.3`, the above configuration will generate a `drumroll.json` manifest in
    65  the root of the repository specified in the `bucket` section.
    66  
    67  ```json
    68  {
    69    "version": "1.2.3",
    70    "architecture": {
    71      "64bit": {
    72        "url":
    73          "https://github.com/user/drumroll/releases/download/1.2.3/drumroll_1.2.3_windows_amd64.tar.gz",
    74        "bin": "drumroll.exe",
    75        "hash": "86920b1f04173ee08773136df31305c0dae2c9927248ac259e02aafd92b6008a"
    76      },
    77      "32bit": {
    78        "url":
    79          "https://github.com/user/drumroll/releases/download/1.2.3/drumroll_1.2.3_windows_386.tar.gz",
    80        "bin": "drumroll.exe",
    81        "hash": "283faa524ef41987e51c8786c61bb56658a489f63512b32139d222b3ee1d18e6"
    82      }
    83    },
    84    "homepage": "https://example.com/"
    85  }
    86  ```
    87  
    88  Your users can then install your app by doing:
    89  
    90  ```sh
    91  scoop bucket add org https://github.com/org/repo.git
    92  scoop install org/drumroll
    93  ```
    94  
    95  You can check the
    96  [Scoop documentation](https://github.com/lukesampson/scoop/wiki) for more
    97  details.