Skip to content

[DEI-125]: update mike #10

[DEI-125]: update mike

[DEI-125]: update mike #10

Workflow file for this run

# This workflow should be triggered when a release of the main is needed.
# It bumps the pyproject.toml version (major
# Using this version it creates a tag and a release
name: Release major or minor version (create tag and bump poetry version)
on:
workflow_dispatch:
inputs:
release_type:
type: choice
description: Choose type of release
default: major
options:
- minor
- major
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.4.2
- name: Pushing to the protected branch 'protected'
uses: CasperWA/push-protected@v2
with:
token: ${{ secrets.PUSH_TO_PROTECTED_BRANCH }}
branch: protected
- name: bump up patch version

Check failure on line 35 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

You have an error in your yaml syntax on line 35
run: |
git config user.name github-actions
git config user.email github-actions@github.com
poetry version ${{ github.event.inputs.release_type }}
PROJECT_VERSION=$(poetry version --short)
echo "PROJECT_VERSION=$PROJECT_VERSION" >> $GITHUB_ENV
sed -i "1 s/.*/version: $PROJECT_VERSION/" template_input.yaml
git add template_input.yaml
git add pyproject.toml
git commit -m "bump up ${{ github.event.inputs.release_type }} version from release workflow: version $PROJECT_VERSION"
git push
- name: Create Release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ env.PROJECT_VERSION }}
release_name: Release ${{ env.PROJECT_VERSION }}
draft: false
prerelease: false
- name: Install Dependencies
run: poetry install
- name: Create new version of mkdocs and publish
run: |
poetry run mike deploy --push --update-aliases ${PROJECT_VERSION} latest
poetry run mike set-default --push latest