Skip to content

Committing local cha #16

Committing local cha

Committing local cha #16

Workflow file for this run

name: Release
on:
push:
branches:
- main # This means the action runs on every push to the 'main' branch
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install bump2version
run: pip install bump2version
- name: Set up Git user
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Delete existing tag if it exists
run: |
TAG_NAME="v$(cat version.txt)"
if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then
git push --delete origin "$TAG_NAME"
git tag -d "$TAG_NAME"
fi
- name: Bump version
run: bump2version minor --allow-dirty --tag
- name: Commit version bump
run: git commit -am "Bump version to $(cat version.txt)"
- name: Push changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
- name: Push tags
run: git push origin --tags
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
files: |
dist/* # Path to any files you want to attach to the release (optional)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}