Skip to content

Commit

Permalink
add alpha option in workflow release (#10)
Browse files Browse the repository at this point in the history
* add alpha release option & set package version to 0.0.0

Signed-off-by: Ilias Elbarnoussi <[email protected]>

* remove echo

Signed-off-by: Ilias Elbarnoussi <[email protected]>

---------

Signed-off-by: Ilias Elbarnoussi <[email protected]>
Co-authored-by: Ilias Elbarnoussi <[email protected]>
  • Loading branch information
IliasElbarnoussi and IliasElbarnoussi authored Jun 10, 2024
1 parent 310661f commit 8a2e8ab
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@ name: Release
on:
workflow_dispatch:
inputs:
releaseType:
description: The type of release. Should be one of "major", "minor", "patch"
release-type:
description: 'Type of release (major, minor, patch, alpha)'
required: true
default: 'patch'
default: alpha
type: choice
options:
- major
- minor
- patch
pull_request:
branches:
- main
- alpha

jobs:
validate:
Expand Down Expand Up @@ -92,6 +90,20 @@ jobs:
- name: Build the library
run: pnpm build

- name: Publish
id: publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
if [ ${{ inputs.release-type }} == 'alpha' ]; then
pnpm release prerelease --yes
else
pnpm release ${{ inputs.release-type }} --force-publish --no-private --yes
fi
version=$(node -p "require('./lerna.json').version")
echo "LERNA_VERSION=$version" >> "$GITHUB_OUTPUT"
# On manual workflow dispatch release stable version
- name: Release version
env:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@paradym/sdk",
"version": "1.0.0",
"version": "0.0.0",
"type": "module",
"license": "Apache-2.0",
"scripts": {
Expand Down

0 comments on commit 8a2e8ab

Please sign in to comment.