This action automates the manual steps needed to generate changelogs and push release tags. For more information on the overall flow of this ci image, take a look at the elementary release process documentation.
This image is intended for use with elementary debian projects. There are a few requirements before getting started:
- The project needs to have a deb-packaging branch with the necessary debian packaging for the project.
- The project needs release information in an
appdata.xmlfile. Docs: appdata
In order to create tags and push changes to various branches, the script needs a github token. Keep in mind, when using github workflows, the virtual environment automatically comes with a generated github token secret.
To change the debian release channel in the project's debian changelog config, you can set the RELEASE_CHANNEL environment variable:
env:
RELEASE_CHANNEL: focalBy default, this action will create and update a branch named 'stable' whenever a release is pushed. The branch name can be set via the release_branch input. Example:
with:
release_branch: 'juno'By default, the examples check for a label called Release on the related pull request. This can be set in the workflow action by changing the following:
# check for "Release" label:
true == contains(join(github.event.pull_request.labels.*.name), 'Release')
# check for "Example" label:
true == contains(join(github.event.pull_request.labels.*.name), 'Example')Instead of using the default github token (GITHUB_TOKEN), you can use a custom git user token with the GIT_USER_TOKEN environment variable. You can also use the following environment variables to set the git user & email:
env:
GIT_USER_TOKEN: "${{ secrets.GIT_USER_TOKEN }}"
GIT_USER_NAME: "example-user"
GIT_USER_EMAIL: "exampleuser@example.com"name: Release
on:
pull_request:
branches: [ $default-branch ]
types: closed
jobs:
release:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && true == contains(join(github.event.pull_request.labels.*.name), 'Release')
steps:
- uses: actions/checkout@v4
- uses: elementary/actions/release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}name: Release
on:
pull_request:
branches: [ $default-branch ]
types: closed
jobs:
release:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && true == contains(join(github.event.pull_request.labels.*.name), 'Release')
steps:
- uses: actions/checkout@v4
- uses: elementary/actions/release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_branch: 'juno'