Skip to content

Merge branch 'master' of https://github.com/Slad3/UniversalSearchQuer… #2

Merge branch 'master' of https://github.com/Slad3/UniversalSearchQuer…

Merge branch 'master' of https://github.com/Slad3/UniversalSearchQuer… #2

Workflow file for this run

name: Update Version
on:
push:
paths:
- '.version'
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Read version from .version
id: read_version
run: echo "VERSION=$(cat .version)" >> $GITHUB_ENV
- name: Update fitl-js/package.json
run: |
jq ".version = \"$VERSION\"" fitl-js/package.json > fitl-js/package.json.tmp
mv fitl-js/package.json.tmp fitl-js/package.json
- name: Update fitl-js/fitl-wasm/Cargo.toml
run: |
sed -i "s/^version = \".*\"/version = \"$VERSION\"/" fitl-js/fitl-wasm/Cargo.toml
- name: Update fitl-rs/Cargo.toml
run: |
sed -i "s/^version = \".*\"/version = \"$VERSION\"/" fitl-rs/Cargo.toml
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add fitl-js/package.json fitl-js/fitl-wasm/Cargo.toml fitl-rs/Cargo.toml
git commit -m "Update version to $VERSION"
git push
- name: Publish fitl-js to npm
working-directory: fitl-js
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
pnpm install
pnpm publish