Skip to content

Commit f9bee9a

Browse files
committed
Correct the release chart package workflow
1 parent 669329b commit f9bee9a

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@ jobs:
9696
name: Charts release
9797
needs: [charts-tests]
9898
if: needs.changes.outputs.charts == 'true'
99-
defaults:
100-
run:
101-
working-directory: ./chart_data_extractor
10299
runs-on: ubuntu-latest
103100
steps:
104101
- name: Checkout Repo
@@ -129,20 +126,21 @@ jobs:
129126
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
130127

131128
- name: Release new versions
132-
uses: changesets/action@v1
133-
with:
134-
publish: pnpm run publish
135-
createGithubReleases: true
129+
run: |
130+
poetry build
131+
poetry config pypi-token.pypi ${PYPI_TOKEN}
132+
poetry publish --skip-existing
133+
working-directory: ./chart_data_extractor
136134
env:
137135
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
138-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
136+
NPM_TOKEN: ${{ secrets.PYPI_TOKEN }}
139137

140138

141139
build-docker-image:
142140
name: Build Docker Image
143141
runs-on: ubuntu-latest
144142
needs: [changes, charts-release]
145-
if: (!cancelled()) && (needs.changes.outputs.template == 'true' || needs.changes.outputs.charts == 'true')
143+
if: (needs.changes.outputs.template == 'true' || needs.changes.outputs.charts == 'true')
146144
steps:
147145
- name: Checkout repository
148146
uses: actions/checkout@v3
@@ -153,7 +151,7 @@ jobs:
153151
name: Build E2B template
154152
runs-on: ubuntu-latest
155153
needs: [build-docker-image]
156-
if: (!cancelled()) && (needs.changes.outputs.template == 'true' || needs.changes.outputs.charts == 'true')
154+
if: (needs.changes.outputs.template == 'true' || needs.changes.outputs.charts == 'true')
157155
steps:
158156
- name: Checkout repository
159157
uses: actions/checkout@v3
@@ -171,20 +169,29 @@ jobs:
171169
python-tests:
172170
name: Python Tests
173171
needs: [changes, build-template]
174-
if: (!cancelled()) && (needs.changes.outputs.python == 'true' || needs.changes.outputs.template == 'true')
172+
if: always() &&
173+
!contains(needs.*.result, 'failure') &&
174+
!contains(needs.*.result, 'cancelled') &&
175+
(needs.changes.outputs.python == 'true' || needs.changes.outputs.template == 'true')
175176
uses: ./.github/workflows/python_tests.yml
176177
secrets: inherit
177178

178179
js-tests:
179180
name: JS Tests
180181
needs: [changes, build-template]
181-
if: (!cancelled()) && (needs.changes.outputs.js == 'true' || needs.changes.outputs.template == 'true')
182+
if: always() &&
183+
!contains(needs.*.result, 'failure') &&
184+
!contains(needs.*.result, 'cancelled') &&
185+
(needs.changes.outputs.js == 'true' || needs.changes.outputs.template == 'true')
182186
uses: ./.github/workflows/js_tests.yml
183187
secrets: inherit
184188

185189
release:
186190
needs: [python-tests, js-tests]
187-
if: (!cancelled()) && (!contains(needs.*.result, 'failure') && (needs.changes.outputs.js == 'true' || needs.changes.outputs.python == 'true'))
191+
if: always() &&
192+
!contains(needs.*.result, 'failure' &&
193+
!contains(needs.*.result, 'cancelled') &&
194+
(needs.changes.outputs.js == 'true' || needs.changes.outputs.python == 'true')
188195
name: Release
189196
runs-on: ubuntu-latest
190197
steps:

0 commit comments

Comments
 (0)