diff --git a/.github/workflows/version-sync.yml b/.github/workflows/version-sync.yml new file mode 100644 index 0000000..580694d --- /dev/null +++ b/.github/workflows/version-sync.yml @@ -0,0 +1,41 @@ +name: Update Version + +on: + push: + paths: + - '.version' # Trigger when the .version file is updated + +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 diff --git a/.version b/.version new file mode 100644 index 0000000..ef2f8c8 --- /dev/null +++ b/.version @@ -0,0 +1 @@ +0.1.87 diff --git a/fitl-js/pnpm-lock.yaml b/fitl-js/pnpm-lock.yaml index 7236152..c30dcac 100644 --- a/fitl-js/pnpm-lock.yaml +++ b/fitl-js/pnpm-lock.yaml @@ -11,9 +11,6 @@ importers: '@assemblyscript/loader': specifier: ^0.27.31 version: 0.27.31 - fitl-wasm: - specifier: file:fitl-wasm\pkg - version: file:fitl-wasm/pkg vite-plugin-top-level-await: specifier: ^1.4.4 version: 1.4.4(rollup@4.26.0)(vite@5.4.11(@types/node@22.9.0)) @@ -698,9 +695,6 @@ packages: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} - fitl-wasm@file:fitl-wasm/pkg: - resolution: {directory: fitl-wasm/pkg, type: directory} - foreground-child@3.3.0: resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} engines: {node: '>=14'} @@ -1608,8 +1602,6 @@ snapshots: locate-path: 5.0.0 path-exists: 4.0.0 - fitl-wasm@file:fitl-wasm/pkg: {} - foreground-child@3.3.0: dependencies: cross-spawn: 7.0.5