A continuous experiment testing various features the devops team can use with their daily workflow.
https://github.com/marketplace/actions/automated-releases
The sample Github actions below watches for changes on the VERSION.txt and triggers a release when VERSION.txt
is changed. To use this, make sure to create a Github Personal Access Token (PAT),
and add it as a Repository Secret named REPOSITORY_TOKEN
.
# Create a GitHub Actions workflow YAML file (e.g., main.yml) in the .github/workflows directory
# This workflow will run only on the main branch
name: Automatically Publish Release
on:
pull_request:
paths:
- 'VERSION.txt'
branches:
- main
push:
paths:
- 'VERSION.txt'
branches:
- main
jobs:
set-secret-and-run-python:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Automated Releases
uses: AnshKetchum/auto-changelog-release@alpha-1
with:
GIT_PERSONAL_ACCESS_TOKEN: ${{ secrets.REPOSITORY_TOKEN }}
-
Maintain a
CHANGELOG.md
file -
Highlight your latest release by wrapping your entry with the following:
--LATEST-- YOUR CHANGELOG HERE --LATEST--
- Highlight your description by wrapping the description inside with the following:
--DESCRIPTION-- YOUR DESCRIPTION HERE --DESCRIPTION--
Example:
--LATEST--
## [1.20.0]
--DESCRIPTION--
- Removed unnecessary log statements from the GCC toolchain from popping up on Windows
--DESCRIPTION--
--LATEST--
In a .env
file, add a personal access token from Github.
GITHUB_PERSONAL_ACCESS_TOKEN=<YOUR_PERSONAL_ACCESS_TOKEN>
- Install the requirements.
pip install -r requirements.txt
- Run the python code.
python create_release.py