Skip to content

Create release commit #20

Create release commit

Create release commit #20

name: Create release commit
on:
workflow_dispatch:
inputs:
dry_run:
description: 'Dry run (create the local commit/tags but do not push it)'
required: true
default: "false"
type: choice
options:
- "true"
- "false"
part:
description: 'What kind of release is this?'
required: true
default: 'patch'
type: choice
options:
- patch
- minor
- major
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- name: Check out main
uses: actions/checkout@v3
with:
ref: main
persist-credentials: false
fetch-depth: 0
lfs: true
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Call bumpversion
uses: ./.github/workflows/bump-version
with:
part: ${{ inputs.part }}
- name: Create tag
working-directory: rust
run: |
git add -u
git commit -m "Bump version"
export TAG="v$(cargo metadata --no-deps --format-version 1 | jq '.packages[0].version' | xargs echo)"
git tag $TAG
- name: Push new version and tag
if: ${{ inputs.dry_run }} == "false"
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.LANCE_RELEASE_TOKEN }}
branch: main
tags: true