Skip to content

Commit

Permalink
ci(release): bump versions to the latest release
Browse files Browse the repository at this point in the history
  • Loading branch information
zimeg committed Jun 16, 2024
1 parent 498695f commit 760d84e
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: release

on:
workflow_dispatch:
inputs:
version:
default: "0.0.1"
description: "Version of the release"
required: true
type: string

jobs:
release:
runs-on: ubuntu-latest
env:
VERSION: ${{ inputs.version }}
steps:
- name: checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- 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: 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 }}

0 comments on commit 760d84e

Please sign in to comment.