https://github.com/olivermking/action-release-workflows
Reusable workflows for that help for releasing GitHub actions
https://github.com/olivermking/action-release-workflows
github-actions github-releases release release-automation reusable-workflows
Last synced: about 1 year ago
JSON representation
Reusable workflows for that help for releasing GitHub actions
- Host: GitHub
- URL: https://github.com/olivermking/action-release-workflows
- Owner: OliverMKing
- Created: 2023-04-03T18:12:34.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-05T19:21:21.000Z (almost 3 years ago)
- Last Synced: 2024-10-05T12:42:51.396Z (over 1 year ago)
- Topics: github-actions, github-releases, release, release-automation, reusable-workflows
- Homepage:
- Size: 76.2 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Release Workflows
Release Workflows automate the process of creating releases based on the CHANGELOG.md file in the project.
## How it works.
The release workflow is triggered when changes are pushed to the main branch and there are updates in the CHANELOG.md file. When a new release is initiated, the workflow executes the following steps:
1. It parses the CHANGELOG.md file to extract the release notes and identifies the most recent version of the release.
2. Next, it checks if a tag for the latest version already exists. If a tag is found, the subsequent workflows are halted to avoid duplication.
3. If there is no existing tag for the latest version, a new branch is created from the main branch. The new branch is named as `releases/`.
4. Once the release branch is set up, the workflow publishes the release to the GitHub repository. The release is tagged with the corresponding version number.
## Usage
1. Start by creating a CHANGELOG.md file to record the changes made in each release of your project.
2. Next, create a workflow YAML file in your project that will be triggered whenever a push is made to the main branch with changes in CHANGELOG.md file.
3. Your release.yaml workflow file should follow a structure similar to the one outlined below:
```
name: release project
on:
push:
branches:
- main
paths:
- CHANGELOG.md
workflow_dispatch:
jobs:
release:
uses: bosesuneha/action-release-workflows/.github/workflows/release_js_project.yaml@main
with:
changelogPath: ./CHANGELOG.md
```
The `release project` workflow can be triggered in two ways: automatically when changes are made to the CHANGELOG.md file and pushed to the main branch, or manually through the GitHub Actions UI.
The `release` job calls the reusable workflow in `action-release-workflows` and takes as input the path to the CHANELOG.md file.