💾 Archived View for cetacean.club › gitea-release captured on 2024-02-05 at 09:29:34. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

gitea-release

A small command line tool to automate releases for Gitea repositories that reads from CHANGELOG and VERSION files. This is a clone of github-release, but more suited for my individual needs. This may also turn into a generic webhook handler, but one thing at a time. :)

Usage

To use this as a drone plugin, add the following to your .drone.yml under the steps key:

- name: auto-release
  image: xena/gitea-release:latest
  pull: always
  settings:
    auth_username: cadey
    changelog_path: ./CHANGELOG.md
    gitea_server: https://tulpa.dev
    gitea_token:
      from_secret: GITEA_TOKEN
  when:
    event:
      - push
    branch:
      - master

Replace the values of the settings as makes sense for your gitea server. The changelog_path attribute is optional, and will be ./CHANGELOG.md by default.

The default branch will automatically be derived from the Gitea API. If you need to hard-code your default branch name for some reason, add the default_branch setting like this:

  - name: auto-release
    image: xena/gitea-release:latest
    pull: always
    settings:
      auth_username: cadey
      default_branch: trunk
      gitea_server: https://tulpa.dev
      gitea_token:
        from_secret: GITEA_TOKEN
    when:
      event:
        - push
      branch:
        - trunk

CHANGELOG and VERSION files

The CHANGELOG.md file is based on the Keep a Changelog format, but modified slightly to make it easier for this tool. Here is an example changelog that this tool accepts:

# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.1.0

Hi there this is a test!

### ADDED

- something

The VERSION file plays into this as well. The VERSION file MUST be a single line containing a semantic version string. When this tool is run with the release subcommand, the following actions take place:

Links

Git repo

Drone

Changelog

---

Go back