-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f5f399e
commit 9fdc2c2
Showing
1 changed file
with
13 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Bump version on Merge | ||
name: Bump Version on Merge | ||
|
||
on: | ||
push: | ||
|
@@ -10,23 +10,31 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Calculate next version | ||
- 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: Authenticate with private NPM package | ||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
|
||
- name: Install dependencies | ||
- name: Install Dependencies | ||
run: | | ||
npm install --ignore-scripts | ||
npm install -g wasm-pack | ||
- name: Configure Git | ||
run: | | ||
git config --global user.name "GitHub Actions" | ||
git config --global user.email "[email protected]" | ||
- name: Bump version and publish | ||
- name: Bump Version and Publish | ||
run: | | ||
./scripts/pump-version.sh ${{ env.NEXT_VERSION }} | ||
env: | ||
|