Skip to content

Commit

Permalink
feat: publish rc npm packages (#38)
Browse files Browse the repository at this point in the history
* feat: add publishing rc versions of npm packages

* chore: bump self-dependencies
  • Loading branch information
nepalevov authored Feb 26, 2024
1 parent 82b180a commit 1045268
Show file tree
Hide file tree
Showing 12 changed files with 74 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
lfs: true
- uses: epam/ai-dial-ci/actions/build_docker@1.4.2
- uses: epam/ai-dial-ci/actions/build_docker@1.5.0
with:
image_name: ghcr.io/${{ env.IMAGE_NAME }}
image_tag: test
Expand Down
29 changes: 22 additions & 7 deletions .github/workflows/node_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
is_latest: ${{ steps.semantic_versioning.outputs.is_latest }}
latest_tag: ${{ steps.semantic_versioning.outputs.latest_tag }}
steps:
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.4.2
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.5.0
id: semantic_versioning

release:
Expand All @@ -94,14 +94,14 @@ jobs:
- calculate_version
- test
steps:
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.4.2
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.5.0
with:
latest_tag: ${{ needs.calculate_version.outputs.latest_tag }}
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
lfs: true
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
- uses: epam/ai-dial-ci/actions/node_prepare@1.4.2
- uses: epam/ai-dial-ci/actions/node_prepare@1.5.0
with:
node_version: ${{ inputs.node_version }}
clean_install: true
Expand All @@ -111,7 +111,7 @@ jobs:
shell: bash
run: |
npm version ${{ needs.calculate_version.outputs.next_version }} --no-git-tag-version || true # upstream branch may already be updated
- uses: epam/ai-dial-ci/actions/build_docker@1.4.2
- uses: epam/ai-dial-ci/actions/build_docker@1.5.0
with:
ghcr_username: ${{ github.actor }}
ghcr_password: ${{ secrets.ACTIONS_BOT_TOKEN }}
Expand All @@ -129,14 +129,29 @@ jobs:
${{ startsWith(github.ref, 'refs/heads/release-') && needs.calculate_version.outputs.is_latest == 'true' && format('{0}:{1}', env.IMAGE_NAME, 'latest') || ''}}
${{ startsWith(github.ref, 'refs/heads/release-') && needs.calculate_version.outputs.is_latest == 'true' && format('{0}/{1}:{2}', 'ghcr.io', env.IMAGE_NAME, 'latest') || ''}}
- name: Publish packages to npmjs
if: ${{ inputs.enable_publish && startsWith(github.ref, 'refs/heads/release-') }}
if: ${{ inputs.enable_publish }}
shell: bash
run: |
#!/bin/bash
npm run build
npm run publish ${{ needs.calculate_version.outputs.is_latest == 'true' && '-- --tag latest' || '' }}
PUBLISH_COMMAND="npm run publish"
ARGS=""
if [ "$IS_DEVELOPMENT_BRANCH" == "true" ]; then
ARGS+=" --development"
fi
if [ "$IS_RELEASE_BRANCH" == "true" ] && [ "$IS_LATEST" == "true" ]; then
ARGS+=" --tag latest"
fi
if [ -n "$ARGS" ]; then
PUBLISH_COMMAND+=" --"$ARGS
fi
$PUBLISH_COMMAND
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: epam/ai-dial-ci/actions/[email protected]
IS_LATEST: ${{ needs.calculate_version.outputs.is_latest == 'true' }}
IS_DEVELOPMENT_BRANCH: ${{ github.ref == 'refs/heads/development' }}
IS_RELEASE_BRANCH: ${{ startsWith(github.ref, 'refs/heads/release-') }}
- uses: epam/ai-dial-ci/actions/[email protected]
with:
tag_version: ${{ needs.calculate_version.outputs.next_version }}
changelog_file: "/tmp/my_changelog" # comes from generate_release_notes step; TODO: beautify
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/node_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
lfs: true
- uses: epam/ai-dial-ci/actions/node_prepare@1.4.2
- uses: epam/ai-dial-ci/actions/node_prepare@1.5.0
with:
node_version: ${{ inputs.node_version }}
clean_install: "true"
Expand All @@ -69,7 +69,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
lfs: true
- uses: epam/ai-dial-ci/actions/node_prepare@1.4.2
- uses: epam/ai-dial-ci/actions/node_prepare@1.5.0
with:
node_version: ${{ inputs.node_version }}
clean_install: "true"
Expand All @@ -86,7 +86,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
lfs: true
- uses: epam/ai-dial-ci/actions/node_prepare@1.4.2
- uses: epam/ai-dial-ci/actions/node_prepare@1.5.0
with:
node_version: ${{ inputs.node_version }}
clean_install: "true"
Expand All @@ -103,7 +103,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
lfs: true
- uses: epam/ai-dial-ci/actions/ort@1.4.2
- uses: epam/ai-dial-ci/actions/ort@1.5.0
with:
bypass_checks: ${{ inputs.bypass_checks || inputs.bypass_ort }}
cli_args: "-P ort.forceOverwrite=true --stacktrace -P ort.analyzer.enabledPackageManagers=NPM"
16 changes: 8 additions & 8 deletions .github/workflows/publish_gradle_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:
style_checks:
runs-on: ubuntu-latest
steps:
- uses: epam/ai-dial-ci/actions/gradle_checkstyle@1.4.2
- uses: epam/ai-dial-ci/actions/gradle_checkstyle@1.5.0

code_checks:
runs-on: ubuntu-latest
steps:
- uses: epam/ai-dial-ci/actions/prepare_java@1.4.2
- uses: epam/ai-dial-ci/actions/prepare_java@1.5.0
- name: Test
continue-on-error: ${{ inputs.bypass_checks }}
run: |
Expand All @@ -48,7 +48,7 @@ jobs:
contents: write
packages: write
steps:
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.4.2
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.5.0
id: semantic_versioning

ort:
Expand All @@ -57,7 +57,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
lfs: true
- uses: epam/ai-dial-ci/actions/ort@1.4.2
- uses: epam/ai-dial-ci/actions/ort@1.5.0
with:
bypass_checks: ${{ inputs.bypass_ort }}

Expand All @@ -75,10 +75,10 @@ jobs:
packages: write

steps:
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.4.2
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.5.0
with:
latest_tag: ${{ needs.calculate_version.outputs.latest_tag }}
- uses: epam/ai-dial-ci/actions/prepare_java@1.4.2
- uses: epam/ai-dial-ci/actions/prepare_java@1.5.0
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
lfs: true
Expand All @@ -87,7 +87,7 @@ jobs:
run: |
sed -i "s/^version = .*/version = \"${{ needs.calculate_version.outputs.next_version }}\"/g" build.gradle
./gradlew build -x test
- uses: epam/ai-dial-ci/actions/build_docker@1.4.2
- uses: epam/ai-dial-ci/actions/build_docker@1.5.0
with:
ghcr_username: ${{ github.actor }}
ghcr_password: ${{ secrets.ACTIONS_BOT_TOKEN }}
Expand All @@ -103,7 +103,7 @@ jobs:
${{ github.ref == 'refs/heads/development' && format('{0}/{1}:{2}', 'ghcr.io', env.IMAGE_NAME, 'development') || ''}}
${{ startsWith(github.ref, 'refs/heads/release-') && needs.calculate_version.outputs.is_latest == 'true' && format('{0}:{1}', env.IMAGE_NAME, 'latest') || ''}}
${{ startsWith(github.ref, 'refs/heads/release-') && needs.calculate_version.outputs.is_latest == 'true' && format('{0}/{1}:{2}', 'ghcr.io', env.IMAGE_NAME, 'latest') || ''}}
- uses: epam/ai-dial-ci/actions/publish_tag_release@1.4.2
- uses: epam/ai-dial-ci/actions/publish_tag_release@1.5.0
with:
tag_version: ${{ needs.calculate_version.outputs.next_version }}
changelog_file: "/tmp/my_changelog" # comes from generate_release_notes step; TODO: beautify
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/publish_python_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
style_checks:
runs-on: ubuntu-latest
steps:
- uses: epam/ai-dial-ci/actions/prepare_python@1.4.2
- uses: epam/ai-dial-ci/actions/prepare_python@1.5.0
with:
python_version: ${{ inputs.python_version }}
install_poetry: true
Expand All @@ -36,7 +36,7 @@ jobs:
code_checks:
runs-on: ubuntu-latest
steps:
- uses: epam/ai-dial-ci/actions/prepare_python@1.4.2
- uses: epam/ai-dial-ci/actions/prepare_python@1.5.0
with:
python_version: ${{ inputs.python_version }}
install_poetry: true
Expand All @@ -57,7 +57,7 @@ jobs:
contents: write
packages: write
steps:
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.4.2
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.5.0
id: semantic_versioning

release:
Expand All @@ -74,7 +74,7 @@ jobs:
packages: write

steps:
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.4.2
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.5.0
with:
latest_tag: ${{ needs.calculate_version.outputs.latest_tag }}
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -85,7 +85,7 @@ jobs:
shell: bash
run: |
sed -i "s/^version = .*/version = \"${{ needs.calculate_version.outputs.non_semver_next_version }}\"/g" pyproject.toml
- uses: epam/ai-dial-ci/actions/build_docker@1.4.2
- uses: epam/ai-dial-ci/actions/build_docker@1.5.0
with:
ghcr_username: ${{ github.actor }}
ghcr_password: ${{ secrets.ACTIONS_BOT_TOKEN }}
Expand All @@ -101,7 +101,7 @@ jobs:
${{ github.ref == 'refs/heads/development' && format('{0}/{1}:{2}', 'ghcr.io', env.IMAGE_NAME, 'development') || ''}}
${{ startsWith(github.ref, 'refs/heads/release-') && needs.calculate_version.outputs.is_latest == 'true' && format('{0}:{1}', env.IMAGE_NAME, 'latest') || ''}}
${{ startsWith(github.ref, 'refs/heads/release-') && needs.calculate_version.outputs.is_latest == 'true' && format('{0}/{1}:{2}', 'ghcr.io', env.IMAGE_NAME, 'latest') || ''}}
- uses: epam/ai-dial-ci/actions/publish_tag_release@1.4.2
- uses: epam/ai-dial-ci/actions/publish_tag_release@1.5.0
with:
tag_version: ${{ needs.calculate_version.outputs.next_version }}
changelog_file: "/tmp/my_changelog" # comes from generate_release_notes step; TODO: beautify
Expand All @@ -111,14 +111,14 @@ jobs:
ort:
runs-on: ubuntu-latest
steps:
- uses: epam/ai-dial-ci/actions/prepare_python@1.4.2
- uses: epam/ai-dial-ci/actions/prepare_python@1.5.0
with:
python_version: ${{ inputs.python_version }}
install_poetry: true
- name: Install dependencies
shell: bash
run: |
poetry install --all-extras
- uses: epam/ai-dial-ci/actions/ort@1.4.2
- uses: epam/ai-dial-ci/actions/ort@1.5.0
with:
bypass_checks: ${{ inputs.bypass_ort }}
16 changes: 8 additions & 8 deletions .github/workflows/publish_python_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
style_checks:
runs-on: ubuntu-latest
steps:
- uses: epam/ai-dial-ci/actions/prepare_python@1.4.2
- uses: epam/ai-dial-ci/actions/prepare_python@1.5.0
with:
python_version: "${{ inputs.python_version }}"
install_poetry: true
Expand All @@ -51,7 +51,7 @@ jobs:
matrix:
python-version: ["3.11", "3.10", "3.9", "3.8"]
steps:
- uses: epam/ai-dial-ci/actions/prepare_python@1.4.2
- uses: epam/ai-dial-ci/actions/prepare_python@1.5.0
with:
python_version: "${{ matrix.python-version }}"
install_poetry: true
Expand All @@ -64,13 +64,13 @@ jobs:
ort:
runs-on: ubuntu-latest
steps:
- uses: epam/ai-dial-ci/actions/prepare_python@1.4.2
- uses: epam/ai-dial-ci/actions/prepare_python@1.5.0
- name: Install dependencies
shell: bash
run: |
pip install poetry
poetry install
- uses: epam/ai-dial-ci/actions/ort@1.4.2
- uses: epam/ai-dial-ci/actions/ort@1.5.0
with:
bypass_checks: ${{ inputs.bypass_ort }}

Expand All @@ -83,7 +83,7 @@ jobs:
contents: write
packages: write
steps:
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.4.2
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.5.0
id: semantic_versioning

release:
Expand All @@ -100,10 +100,10 @@ jobs:
packages: write

steps:
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.4.2
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.5.0
with:
latest_tag: ${{ needs.calculate_version.outputs.latest_tag }}
- uses: epam/ai-dial-ci/actions/prepare_python@1.4.2
- uses: epam/ai-dial-ci/actions/prepare_python@1.5.0
with:
python_version: "${{ inputs.python_version }}"
install_poetry: true
Expand All @@ -130,7 +130,7 @@ jobs:
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: make publish
- uses: epam/ai-dial-ci/actions/publish_tag_release@1.4.2
- uses: epam/ai-dial-ci/actions/publish_tag_release@1.5.0
with:
tag_version: ${{ needs.calculate_version.outputs.non_semver_next_version }}
changelog_file: "/tmp/my_changelog" # comes from generate_release_notes step; TODO: beautify
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish_vanilla_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
contents: write
packages: write
steps:
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.4.2
- uses: epam/ai-dial-ci/actions/semantic_versioning@1.5.0
id: semantic_versioning

ort:
Expand All @@ -35,7 +35,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
lfs: true
- uses: epam/ai-dial-ci/actions/ort@1.4.2
- uses: epam/ai-dial-ci/actions/ort@1.5.0
with:
bypass_checks: ${{ inputs.bypass_ort }}

Expand All @@ -51,13 +51,13 @@ jobs:
packages: write

steps:
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.4.2
- uses: epam/ai-dial-ci/actions/generate_release_notes@1.5.0
with:
latest_tag: ${{ needs.calculate_version.outputs.latest_tag }}
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
lfs: true
- uses: epam/ai-dial-ci/actions/build_docker@1.4.2
- uses: epam/ai-dial-ci/actions/build_docker@1.5.0
with:
ghcr_username: ${{ github.actor }}
ghcr_password: ${{ secrets.ACTIONS_BOT_TOKEN }}
Expand All @@ -73,7 +73,7 @@ jobs:
${{ github.ref == 'refs/heads/development' && format('{0}/{1}:{2}', 'ghcr.io', env.IMAGE_NAME, 'development') || ''}}
${{ startsWith(github.ref, 'refs/heads/release-') && needs.calculate_version.outputs.is_latest == 'true' && format('{0}:{1}', env.IMAGE_NAME, 'latest') || ''}}
${{ startsWith(github.ref, 'refs/heads/release-') && needs.calculate_version.outputs.is_latest == 'true' && format('{0}/{1}:{2}', 'ghcr.io', env.IMAGE_NAME, 'latest') || ''}}
- uses: epam/ai-dial-ci/actions/publish_tag_release@1.4.2
- uses: epam/ai-dial-ci/actions/publish_tag_release@1.5.0
with:
tag_version: ${{ needs.calculate_version.outputs.next_version }}
changelog_file: "/tmp/my_changelog" # comes from generate_release_notes step; TODO: beautify
10 changes: 5 additions & 5 deletions .github/workflows/test_gradle_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:
style_checks:
runs-on: ubuntu-latest
steps:
- uses: epam/ai-dial-ci/actions/gradle_checkstyle@1.4.2
- uses: epam/ai-dial-ci/actions/gradle_checkstyle@1.5.0

code_checks:
runs-on: ubuntu-latest
steps:
- uses: epam/ai-dial-ci/actions/prepare_java@1.4.2
- uses: epam/ai-dial-ci/actions/prepare_java@1.5.0
- name: Test
continue-on-error: ${{ inputs.bypass_checks }}
run: |
Expand All @@ -41,10 +41,10 @@ jobs:
docker_build:
runs-on: ubuntu-latest
steps:
- uses: epam/ai-dial-ci/actions/prepare_java@1.4.2
- uses: epam/ai-dial-ci/actions/prepare_java@1.5.0
- name: Build
run: ./gradlew build -x test
- uses: epam/ai-dial-ci/actions/build_docker@1.4.2
- uses: epam/ai-dial-ci/actions/build_docker@1.5.0
with:
image_name: ghcr.io/${{ env.IMAGE_NAME }}
image_tag: test
Expand All @@ -57,6 +57,6 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
lfs: true
- uses: epam/ai-dial-ci/actions/ort@1.4.2
- uses: epam/ai-dial-ci/actions/ort@1.5.0
with:
bypass_checks: ${{ inputs.bypass_ort }}
Loading

0 comments on commit 1045268

Please sign in to comment.