Skip to content

Fix order

Fix order #187

Workflow file for this run

name: unitsnet-js
on: [push,workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Prepare dependencies
run: |
npm i -g yarn
cd generator-scripts
yarn install --frozen-lockfile
cd ..
yarn install --frozen-lockfile
- name: Bump Version
run: |
VERSION=$(node -p "require('./package.json').version")
DEFINITION_VERSION=$(node -p "require('./package.json').definitionVersion")
CURRENT_DEFINITION=$(node ./scripts/definition-version.js)
NEXT_VERSION=$(node ./scripts/next-package-version.js $VERSION $DEFINITION_VERSION $CURRENT_DEFINITION)
echo $VERSION
echo $DEFINITION_VERSION
echo $CURRENT_DEFINITION
echo $NEXT_VERSION
jq '.version = "$NEXT_VERSION" | .definitionVersion = "$CURRENT_DEFINITION"' package.json > tmp.json && mv tmp.json package.json
cat package.json
# - name: Build & Test 🔧
# run: |
# yarn generate
# yarn test
# cover:
# needs: build
# runs-on: ubuntu-latest
# strategy:
# matrix:
# node-version: [">=14.6"]
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Install node
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# - name: Run Coverage
# run: |
# yarn install
# yarn run cover
# - name: Publish to Coveralls
# uses: coverallsapp/github-action@v2
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# release:
# needs: build
# runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/master'
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: '16.x'
# registry-url: 'https://registry.npmjs.org'
# - name: Prepare dependencies
# run: |
# npm i -g yarn
# cd generator-scripts
# yarn install --frozen-lockfile
# cd ..
# yarn install --frozen-lockfile
# - name: Bomb Version
# id: update_version
# run: |
# git pull
# version=$(npm --no-git-tag-version --tag-version-prefix= version patch)
# echo $version
# echo "VERSION=$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
# 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: Publish package on NPM 📦
# run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Create Release
# 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
# - name: Commit and push generated docs update
# uses: devops-infra/action-commit-push@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# commit_message: Update gen docs for version ${{ steps.update_version.outputs.VERSION }} [skip-ci]
# - name: Call re-run generate & publish Python package # Trigger Python package re-generate and publish to PyPi (https://github.com/haimkastner/unitsnet-py)
# env:
# UNITSNET_PYTHON_WORKFLOW_TOKEN: ${{ secrets.UNITSNET_PYTHON_WORKFLOW_TOKEN }}
# run: |
# # Trigger re-generate Python units once a new release created
# curl --fail --location --request POST 'https://api.github.com/repos/haimkastner/unitsnet-py/actions/workflows/build.yml/dispatches' \
# --header 'Accept: application/vnd.github.everest-preview+json' \
# --header 'Content-Type: application/json' \
# --header "Authorization: token $UNITSNET_PYTHON_WORKFLOW_TOKEN" \
# --data-raw '{"ref": "main" }'