-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.47 KB
/
version-sync.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# 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: |
# npm install
# npm publish