Skip to content

Commit

Permalink
Merge pull request #103 from superfaceai/chore/fix_release_pipeline_p…
Browse files Browse the repository at this point in the history
…ublish_js

Fix when publish step should happen
  • Loading branch information
freaz authored Sep 4, 2023
2 parents caa8add + 373e9a7 commit 59cb34d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
# when host-python is skipped this job should still run if inputs allow
# so we need to include a status check, then manually ensure core build didn't fail
# (see https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions)
if: ${{ !cancelled() && (needs.core.result == 'success') && (inputs.host == 'js' || inputs.host == 'all') }}
if: ${{ !cancelled() && needs.core.result == 'success' && (inputs.host == 'js' || inputs.host == 'all') }}
runs-on: ubuntu-latest
outputs:
RELEASE_VERSION: ${{ steps.release-version.outputs.RELEASE_VERSION }}
Expand Down Expand Up @@ -122,6 +122,10 @@ jobs:
- name: Resolve release version
id: release-version
run: scripts/release-version.sh ./host/javascript/VERSION ${{ steps.release-level.outputs.RELEASE_LEVEL }} ${{ steps.release-level.outputs.RELEASE_PREID }} >>$GITHUB_OUTPUT
# Update version
- name: Update version in package.json
working-directory: host/python
run: yarn version --no-git-tag-version --new-version ${{ steps.release-version.outputs.RELEASE_VERSION }}
# Build
- uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -187,7 +191,7 @@ jobs:
host-javascript-publish:
name: Publish JavaScript Host
needs: [core, host-javascript-prepare]
if: ${{ inputs.host == 'js' || inputs.host == 'all' }}
if: ${{ !cancelled() && needs.host-javascript-prepare.result == 'success' }}
runs-on: ubuntu-latest
steps:
# Setup
Expand Down Expand Up @@ -245,7 +249,7 @@ jobs:
# Update version
- name: Update version in pyproject
working-directory: host/python
run: toml set --toml-path pyproject.toml project.version ${{ steps.release-version.outputs.RELEASE_VERSION }}
run: toml set --toml-path pyproject.toml project.version ${{ steps.release-version.outputs.RELEASE_VERSION }}
# Build
- uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -307,7 +311,7 @@ jobs:
host-python-publish:
name: Publish Python Host
needs: [core, host-python-prepare]
if: ${{ inputs.host == 'python' || inputs.host == 'all' }}
if: ${{ !cancelled() && needs.host-python-prepare.result == 'success' }}
runs-on: ubuntu-latest
steps:
# Setup
Expand Down

0 comments on commit 59cb34d

Please sign in to comment.