release #18
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Version of the release" | |
required: true | |
type: string | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v4 | |
- name: configure git | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
- name: parse input | |
run: | | |
VERSION=$(echo "${{ inputs.version }}" | sed -E "s/^v//g") | |
echo $VERSION | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: bump versions | |
run: | | |
DATE=$(date +"%B %d %Y") | |
MANPAGE=".TH wd \"1\" \"$DATE\" \"wd $VERSION\" \"wd Manual\"" | |
sed -i -E "1 s/.*/$MANPAGE/" wd.1 | |
sed -i -E "s/WD_VERSION=.*/WD_VERSION=$VERSION/" wd.sh | |
- name: commit changes | |
run: | | |
git add wd.1 wd.sh | |
git commit -m "chore(update): bump current version to v$VERSION" | |
git tag v$VERSION | |
git push -u origin master --tags | |
- name: release latest | |
run: | | |
gh release create v$VERSION --generate-notes | |
env: | |
GH_TOKEN: ${{ github.token }} |