See https://github.com/Qovery/qovery-openapi-spec/commit/d35d0e41b68f… #224
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: Tagging | |
on: | |
push: | |
branches: ['main'] | |
jobs: | |
build: | |
name: Bump tag | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Create an incremental release | |
uses: aurestic/incrementarl-create-release@master | |
with: | |
flag_branch: false | |
message: Bump version | |
prev_tag: 'v' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Save last tag to file | |
run: | | |
echo "LAST_TAG=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV | |
- name: Replace tag in package.json and commit it the changes | |
run: | | |
sed -i "s/\"version\": \".*\"/\"version\": \"$LAST_TAG\"/g" package.json | |
- name: Setup Git | |
run: | | |
git config user.name 'Qovery Bot' | |
git config user.email '[email protected]' | |
- name: commit changes | |
run: | | |
git add package.json | |
git commit -m "chore: bump version to $LAST_TAG" | |
git push origin main | |