github.com/goreleaser/goreleaser@v1.25.1/www/docs/customization/aur.md (about)

     1  # Arch User Repositories
     2  
     3  > Since: v1.4
     4  
     5  After releasing to GitHub, GitLab, or Gitea, GoReleaser can generate and publish
     6  a `PKGBUILD` to an _Arch User Repository_.
     7  
     8  !!! warning
     9  
    10      Before going further on this, make sure to read
    11      [AUR's Submission Guidelines](https://wiki.archlinux.org/title/AUR_submission_guidelines).
    12  
    13  This page describes the available options.
    14  
    15  ```yaml
    16  # .goreleaser.yaml
    17  aurs:
    18    - # The package name.
    19      #
    20      # Note that since this integration does not create a PKGBUILD to build from
    21      # source, per Arch's guidelines.
    22      # That said, GoReleaser will enforce a `-bin` suffix if its not present.
    23      #
    24      # Default: ProjectName with a -bin suffix.
    25      name: package-bin
    26  
    27      # Artifact IDs to filter for.
    28      # Empty means all IDs (no filter).
    29      ids:
    30        - foo
    31        - bar
    32  
    33      # Your app's homepage.
    34      homepage: "https://example.com/"
    35  
    36      # Your app's description.
    37      #
    38      # Templates: allowed
    39      description: "Software to create fast and easy drum rolls."
    40  
    41      # The maintainers of the package.
    42      maintainers:
    43        - "Foo Bar <foo at bar dot com>"
    44  
    45      # The contributors of the package.
    46      contributors:
    47        - "Foo Zaz <foo at zaz dot com>"
    48  
    49      # SPDX identifier of your app's license.
    50      license: "MIT"
    51  
    52      # The SSH private key that should be used to commit to the Git repository.
    53      # This can either be a path or the key contents.
    54      #
    55      # IMPORTANT: the key must not be password-protected.
    56      #
    57      # WARNING: do not expose your private key in the configuration file!
    58      private_key: "{{ .Env.AUR_KEY }}"
    59  
    60      # The AUR Git URL for this package.
    61      # Publish is skipped if empty.
    62      git_url: "ssh://aur@aur.archlinux.org/mypackage-bin.git"
    63  
    64      # Setting this will prevent goreleaser to actually try to commit the updated
    65      # formula - instead, the formula file will be stored on the dist directory
    66      # only, leaving the responsibility of publishing it to the user.
    67      #
    68      # If set to auto, the release will not be uploaded to the AUR repo
    69      # in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1.
    70      skip_upload: true
    71  
    72      # List of additional packages that the software provides the features of.
    73      #
    74      # Default: ProjectName
    75      provides:
    76        - mybin
    77  
    78      # List of packages that conflict with, or cause problems with the package.
    79      #
    80      # Default: ProjectName
    81      conflicts:
    82        - mybin
    83  
    84      # List of packages that must be installed to install this.
    85      depends:
    86        - curl
    87  
    88      # List of packages that are not needed for the software to function,
    89      # but provide additional features.
    90      #
    91      # Must be in the format `package: short description of the extra functionality`.
    92      optdepends:
    93        - "wget: for downloading things"
    94  
    95      # List of files that can contain user-made changes and should be preserved
    96      # during package upgrades and removals.
    97      #
    98      # Since: v1.12
    99      backup:
   100        - /etc/foo.conf
   101  
   102      # Custom package instructions.
   103      # which is not always correct.
   104      #
   105      # We recommend you override this, installing the binary, license and
   106      # everything else your package needs.
   107      #
   108      # Default: 'install -Dm755 "./PROJECT_NAME" "${pkgdir}/usr/bin/PROJECT_NAME"'
   109      package: |-
   110        # bin
   111        install -Dm755 "./mybin" "${pkgdir}/usr/bin/mybin"
   112  
   113        # license
   114        install -Dm644 "./LICENSE.md" "${pkgdir}/usr/share/licenses/mybin/LICENSE"
   115  
   116        # completions
   117        mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
   118        mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
   119        mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
   120        install -Dm644 "./completions/mybin.bash" "${pkgdir}/usr/share/bash-completion/completions/mybin"
   121        install -Dm644 "./completions/mybin.zsh" "${pkgdir}/usr/share/zsh/site-functions/_mybin"
   122        install -Dm644 "./completions/mybin.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/mybin.fish"
   123  
   124        # man pages
   125        install -Dm644 "./manpages/mybin.1.gz" "${pkgdir}/usr/share/man/man1/mybin.1.gz"
   126  
   127      # Git author used to commit to the repository.
   128      commit_author:
   129        name: goreleaserbot
   130        email: bot@goreleaser.com
   131  
   132      # Commit message.
   133      #
   134      # Default: 'Update to {{ .Tag }}'
   135      # Templates: allowed
   136      commit_msg_template: "pkgbuild updates"
   137  
   138      # If you build for multiple GOAMD64 versions, you may use this to choose which one to use.
   139      #
   140      # Default: 'v1'.
   141      goamd64: v2
   142  
   143      # The value to be passed to `GIT_SSH_COMMAND`.
   144      # This is mainly used to specify the SSH private key used to pull/push to
   145      # the Git URL.
   146      #
   147      # Default: 'ssh -i {{ .KeyPath }} -o StrictHostKeyChecking=accept-new -F /dev/null'
   148      git_ssh_command: "ssh -i {{ .Env.KEY }} -o SomeOption=yes"
   149  
   150      # URL which is determined by the given Token
   151      # (github, gitlab or gitea).
   152      #
   153      # Default: depends on the client
   154      # Templates: allowed
   155      url_template: "http://github.mycompany.com/foo/bar/releases/{{ .Tag }}/{{ .ArtifactName }}"
   156  
   157      # Directory in which the files will be created inside the repository.
   158      # Only useful if you're creating your own AUR with multiple packages in a
   159      # single repository.
   160      #
   161      # Since: v1.23
   162      # Default: .
   163      # Templates: allowed
   164      directory: "."
   165  ```
   166  
   167  !!! tip
   168  
   169      Learn more about the [name template engine](/customization/templates/).
   170  
   171  !!! tip
   172  
   173      For more info about what each field does, please refer to
   174      [Arch's PKGBUILD reference](https://wiki.archlinux.org/title/PKGBUILD).