test bump version CI #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bump Version on Merge | |
on: | |
push: | |
branches: | |
- csl-action-pump-ver # TODO: reverse | |
jobs: | |
bump_version: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Calculate next Version | |
run: | | |
# Get the current version from the subdirectory's package.json | |
current_version=$(jq -r '.version' package.json) | |
# Calculate and append the next version directly into GITHUB_ENV in one line | |
echo "NEXT_VERSION=$(echo "$current_version" | awk -F'[-.]' '{print $1"."$2"."$3"-minswap."$5+1}')" >> "$GITHUB_ENV" | |
- name: Install Dependencies | |
run: | | |
npm install --ignore-scripts | |
npm install -g wasm-pack | |
- name: Bump Version and Publish | |
run: | | |
./scripts/pump-version.sh ${{ env.NEXT_VERSION }} | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |