Skip to content

Commit

Permalink
fix: create and tag a release when building
Browse files Browse the repository at this point in the history
  • Loading branch information
builder555 committed Nov 5, 2024
1 parent 5c3c274 commit 3abeb8b
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,39 +75,39 @@ jobs:
last-version: ${{ steps.last-version.outputs.version }}
last-hash: ${{ steps.last-version.outputs.hash }}

# create-release:
# needs: semver-action
# runs-on: ubuntu-latest
# if: needs.semver-action.outputs.version != ''
# steps:
# - name: Checkout code
# uses: actions/checkout@v4

# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: '3.10'

# - name: Update pyproject.toml version
# run: |
# cd server
# pip install poetry
# poetry version ${{ needs.semver-action.outputs.version }}

# - name: Commit version changes
# run: |
# git config --local user.email "github-actions[bot]@users.noreply.github.com"
# git config --local user.name "github-actions[bot]"
# git add pyproject.toml
# git commit -m "chore: bump version to v${{ needs.semver-action.outputs.version }}"
# git tag v${{ needs.semver-action.outputs.version }}
create-release:
needs: semver-action
runs-on: ubuntu-latest
if: needs.semver-action.outputs.version != ''
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Update pyproject.toml version
run: |
cd server
pip install poetry
poetry version ${{ needs.semver-action.outputs.version }}
- name: Commit version changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add pyproject.toml
git commit -m "chore: bump version to v${{ needs.semver-action.outputs.version }}"
git tag v${{ needs.semver-action.outputs.version }}
# - name: Push changes
# uses: ad-m/github-push-action@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# branch: ${{ github.ref }}
# tags: true
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
tags: true

build-and-push:
needs: semver-action
Expand Down

0 comments on commit 3abeb8b

Please sign in to comment.