https://github.com/xmidt-org/release-builder-action
An action that builds release source artifacts and notes from the changelog file.
https://github.com/xmidt-org/release-builder-action
Last synced: 17 days ago
JSON representation
An action that builds release source artifacts and notes from the changelog file.
- Host: GitHub
- URL: https://github.com/xmidt-org/release-builder-action
- Owner: xmidt-org
- License: apache-2.0
- Created: 2021-09-14T10:18:06.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-25T05:25:47.000Z (29 days ago)
- Last Synced: 2025-04-25T06:30:01.599Z (29 days ago)
- Language: Go
- Size: 332 KB
- Stars: 0
- Watchers: 12
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Archiving The Repo
[GoReleaser](https://goreleaser.com/) does a better job than this action, and with no users now we are archiving the repo.
# Release Builder Action
[](https://github.com/xmidt-org/release-builder-action/actions/workflows/ci.yml)
[](http://codecov.io/github/xmidt-org/release-builder-action?branch=main)
[](https://goreportcard.com/report/github.com/xmidt-org/release-builder-action)
[](https://github.com/xmidt-org/release-builder-action/blob/main/LICENSE)
[](CHANGELOG.md)An action that builds release source artifacts, generates a sha256sum for all artifacts,
and extracts release notes from the changelog file, placing them in the github release.## Motivation
### What it does?
- Collect the snapshot of the repository as a tarball and zip file as artifacts.
- Generates release notes based on the [changelog](https://keepachangelog.com/en/1.0.0/) file present and the tag.
- Generates sha256sum values for all assets.
- Uploads the collection of source artifacts and sha256sum value with release notes as a release.
- Optionally generates a [Meson](https://mesonbuild.com/) wrap file to associate with the release.### Why do this?
1. It is really handy to create a quality release based on simply updating the
CHANGELOG.md file.
2. If you are using the Meson build based project the automatic generation of
the meson wrap file makes inclusion into other projects simple.
3. Github has a long standing bug that the yocto community has run into regarding
the checksum values and source tarball/zip files not being 100% stable at all
times. A workaround to this is to build your own source artifacts, calculate
the sha256sum and upload them yourself.## Action Inputs
- **gh-token**: (optional) Provides permissions for pushing the new tag. Generally this should be `${{ secrets.GITHUB_TOKEN }}`.
- **changelog**: (optional) Name of the to the changelog.md file. Defaults to `CHANGELOG.md`.
- **artifact-dir**: (optional) The directory to place the artifacts. Defaults to `artifacts`.
- **tag-prefix**: (optional) The prefix for the tag used. Defaults to `v`.
- **artifact-dir**: (optional) The name of the artifacts directory to work in and with. Defaults to `artifacts`.
- **shasum-file**: (optional) The checksum file name to use. Defaults to `sha256sum.txt`.
- **meson-provides**: (optional) The name of the meson artifact provided. The name defaults to the repository name if not specified.
- **dry-run**: (optional) If `true` the tag is not pushed. Defaults to `false`.## Action Outputs
- **release-tag**: The release tag based on the input.
- **release-name**: The release name based on the input.
- **release-body-file**: The release body filename based on the input.
- **artifact-dir**: The directory containing the artifacts.## Example
This example will build the artifacts when a versioned tag is pushed:```yml
name: Releaseon:
push:
paths:
- "CHANGELOG.md"
branches:
- mainjobs:
release:
runs-on: [ ubuntu-latest ]
name: Release Job
steps:
- uses: actions/checkout@v2- name: Generate Release Bundle
uses: xmidt-org/release-builder-action@v3
id: bundle
with:
gh-token: ${{ secrets.TOKEN }}- name: Upload Release
uses: ncipollo/release-action@v1
with:
name: ${{ steps.bundle.outputs.release-name }}
tag: ${{ steps.bundle.outputs.release-tag }}
draft: false
prerelease: false
bodyFile: ${{ steps.bundle.outputs.release-body-file }}
artifacts: "${{ steps.bundle.outputs.artifact-dir }}/*"
token: ${{ secrets.TOKEN }}
```**Note:** In the example we show using [ncipollo/release-action](https://github.com/ncipollo/release-action). These work well together.