Skip to content

Commit

Permalink
fix: Own version update fix (#3196)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew committed Feb 27, 2023
1 parent 4f14549 commit 10b41fc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
13 changes: 13 additions & 0 deletions .github/update_own_version.sh
@@ -0,0 +1,13 @@
#!/bin/bash

set -e

CURRENT_VERSION=$(npm pkg get version)

if [[ $CURRENT_VERSION == *beta* ]]; then
echo "Current beta update"
npm version prerelease --preid=beta --ignore-scripts
else
echo "Next minor beta update"
npm version preminor --preid=beta --ignore-scripts
fi
8 changes: 4 additions & 4 deletions .github/workflows/continuous-publish-new-version.yaml
Expand Up @@ -35,14 +35,14 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: update package version
# This step always creates beta version
# sample transition after official release: 4.20.0 -> 4.21.0-beta.0
# sample transition after previous beta release: 4.21.0-beta.0 -> 4.21.0-beta.1
#
# The new version is pushed back to master and to npm
- name: update own version
run: .github/update_own_version.sh
- name: push new version
# The new version is pushed back to main and to npm
run: |
npm version prerelease --preid=beta --ignore-scripts
git push origin ${{ github.ref_name }}
git push --tags
env:
Expand Down

0 comments on commit 10b41fc

Please sign in to comment.