Merge pull request #249 from medyo/develop #1
This file contains hidden or 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: '📌 Auto Tag on Master' | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- 'README.md' | |
- 'LICENSE' | |
- '.gitignore' | |
- '.github/**' | |
- '*.md' | |
- '.vscode/**' | |
jobs: | |
auto-tag: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Bump version and tag | |
id: tag_version | |
uses: anothrNick/github-tag-action@1.67.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WITH_V: true | |
DEFAULT_BUMP: patch | |
- name: Update manifest.json | |
run: | | |
new_version=$(echo "${{ steps.tag_version.outputs.new_tag }}" | sed 's/^v//') | |
jq --arg version "$new_version" '.version = $version' public/base.manifest.json > public/base.manifest.json.tmp && mv public/base.manifest.json.tmp public/base.manifest.json | |
git config --global user.name 'Hackertab CI bot' | |
git config --global user.email '2389584+medyo@users.noreply.github.com' | |
git commit -am "Bump manifest version to $new_version" || echo "No changes" | |
git push |