Use rc instead of beta

This commit is contained in:
garronej 2022-10-11 16:59:34 +02:00
parent 4c256a39a8
commit 1672a0cf9d
3 changed files with 15 additions and 14 deletions

View file

@ -35,7 +35,7 @@ jobs:
steps:
- name: Tell if project is using npm or yarn
id: step1
uses: garronej/ts-ci@v1.1.9
uses: garronej/ts-ci@v2.0.0
with:
action_name: tell_if_project_uses_npm_or_yarn
- uses: actions/checkout@v3
@ -65,9 +65,9 @@ jobs:
from_version: ${{ steps.step1.outputs.from_version }}
to_version: ${{ steps.step1.outputs.to_version }}
is_upgraded_version: ${{ steps.step1.outputs.is_upgraded_version }}
is_release_beta: ${{steps.step1.outputs.is_release_beta }}
is_pre_release: ${{steps.step1.outputs.is_pre_release }}
steps:
- uses: garronej/ts-ci@v1.1.9
- uses: garronej/ts-ci@v2.0.0
id: step1
with:
action_name: is_package_json_version_upgraded
@ -75,13 +75,13 @@ jobs:
create_github_release:
runs-on: ubuntu-latest
# We create a release only if the version have been upgraded and we are on a default branch
# PR on the default branch can release beta but not real release
# We create a release only if the version have been upgraded and we are on the main branch
# or if we are on a branch of the repo that has an PR open on main.
if: |
needs.check_if_version_upgraded.outputs.is_upgraded_version == 'true' &&
(
github.event_name == 'push' ||
needs.check_if_version_upgraded.outputs.is_release_beta == 'true'
needs.check_if_version_upgraded.outputs.is_pre_release == 'true'
)
needs:
- check_if_version_upgraded
@ -93,7 +93,7 @@ jobs:
target_commitish: ${{ github.head_ref || github.ref }}
generate_release_notes: true
draft: false
prerelease: ${{ needs.check_if_version_upgraded.outputs.is_release_beta == 'true' }}
prerelease: ${{ needs.check_if_version_upgraded.outputs.is_pre_release == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -131,11 +131,11 @@ jobs:
false
fi
EXTRA_ARGS=""
if [ "$IS_BETA" = "true" ]; then
EXTRA_ARGS="--tag beta"
if [ "$IS_PRE_RELEASE" = "true" ]; then
EXTRA_ARGS="--tag next"
fi
npm publish $EXTRA_ARGS
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
VERSION: ${{ needs.check_if_version_upgraded.outputs.to_version }}
IS_BETA: ${{ needs.check_if_version_upgraded.outputs.is_release_beta }}
IS_PRE_RELEASE: ${{ needs.check_if_version_upgraded.outputs.is_pre_release }}

View file

@ -12,7 +12,7 @@ jobs:
- name: Checking availability for module name ${{github.event.repository.name}} on NPM.
id: id1
uses: garronej/ts-ci@v1.1.9
uses: garronej/ts-ci@v2.0.0
with:
action_name: is_well_formed_and_available_module_name
module_name: ${{github.event.repository.name}}
@ -38,7 +38,7 @@ jobs:
mv LICENSE.template LICENSE
- name : String replace
id: id2
uses: garronej/ts-ci@v1.1.9
uses: garronej/ts-ci@v2.0.0
with:
action_name: string_replace
input_string: ${{github.event.repository.name}}