Skip to content

Update docs

Update docs #9

Workflow file for this run

name: unitsnet-go
on: [push, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: actions/setup-go@v5
with:
go-version: '1.23.3'
- name: Generate units
run: |
pip install -r units_generator/requirements-dev.txt
python units_generator/generate_package.py
- name: Test units
run: |
go test ./tests/...
- name: Bump version
if: github.ref == 'refs/heads/main'
id: update_version
run: |
VERSION=$(cat release/package_version)
DEFINITION_VERSION=$(cat release/definition_version)
CURRENT_DEFINITION=$(python ./scripts/definition-version.py)
NEXT_VERSION=$(python ./scripts/next-package-version.py $VERSION $DEFINITION_VERSION $CURRENT_DEFINITION)
echo $NEXT_VERSION > release/package_version
echo $CURRENT_DEFINITION > release/definition_version
echo "VERSION=v$NEXT_VERSION" >> $GITHUB_OUTPUT
- name: Get version info
id: version_info
run: |
body=$(git log -1 --pretty=%B | sed -n '1p')
echo "BODY=$body" >> $GITHUB_OUTPUT
- name: Commit and push version
if: github.ref == 'refs/heads/main'
uses: devops-infra/action-commit-push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
commit_message: Update to version ${{ steps.update_version.outputs.VERSION }} [skip-ci]
- name: Create Release
if: github.ref == 'refs/heads/main'
id: create_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.update_version.outputs.VERSION }}
name: Package Version ${{ steps.update_version.outputs.VERSION }}
body: ${{ steps.version_info.outputs.BODY }}
draft: false
prerelease: false