Skip to content

Commit c9b1adc

Browse files
committed
enable all code
Signed-off-by: Thijs Baaijen <[email protected]>
1 parent d7e1442 commit c9b1adc

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

.github/workflows/build-test-and-sonar.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,18 @@ jobs:
146146
with:
147147
python-version: "3.11"
148148

149+
- name: Load built wheel file
150+
uses: actions/download-artifact@v4
151+
with:
152+
name: power-grid-model-ds
153+
path: wheelhouse/
154+
149155
- name: Checkout source code
150-
# if: (github.event_name == 'push')
156+
if: (github.event_name == 'push')
151157
uses: actions/checkout@v4 # needed by 'Prevent automatic major/minor release'
152158

153159
- name: Prevent automatic major/minor release
154-
# if: (github.event_name == 'push')
160+
if: (github.event_name == 'push')
155161
run: |
156162
echo "Fetching the latest release..."
157163
tag=$(gh release view --json tagName --jq '.tagName')
@@ -162,32 +168,26 @@ jobs:
162168
if [ "$major_minor" = "$version_file" ]; then
163169
echo "Patch release detected. Proceeding with automatic release."
164170
else
165-
echo "Cannot automatically release a new major.minor version. Please trigger manually if desired."
171+
echo "Cannot automatically release a new major/minor version. Please trigger manually if desired."
166172
exit 1
167173
fi
168174
env:
169175
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
170-
#
171-
# - name: Load built wheel file
172-
# uses: actions/download-artifact@v4
173-
# with:
174-
# name: power-grid-model-ds
175-
# path: wheelhouse/
176-
#
177-
# - name: Upload wheels
178-
# if: (github.event_name == 'push') || ((github.event_name == 'workflow_dispatch') && (github.event.inputs.create_release == 'true'))
179-
# run: |
180-
# pip install twine
181-
# echo "Publish to PyPI..."
182-
# twine upload --verbose wheelhouse/*
183-
#
184-
# - name: Release
185-
# if: (github.event_name == 'push') || ((github.event_name == 'workflow_dispatch') && (github.event.inputs.create_release == 'true'))
186-
# uses: softprops/action-gh-release@v2
187-
# with:
188-
# files: |
189-
# ./wheelhouse/*
190-
# tag_name: v${{ needs.build-python.outputs.version }}
191-
# prerelease: ${{github.ref != 'refs/heads/main'}}
192-
# generate_release_notes: true
193-
# target_commitish: ${{ github.sha }}
176+
177+
- name: Upload wheels
178+
if: (github.event_name == 'push') || ((github.event_name == 'workflow_dispatch') && (github.event.inputs.create_release == 'true'))
179+
run: |
180+
pip install twine
181+
echo "Publish to PyPI..."
182+
twine upload --verbose wheelhouse/*
183+
184+
- name: Release
185+
if: (github.event_name == 'push') || ((github.event_name == 'workflow_dispatch') && (github.event.inputs.create_release == 'true'))
186+
uses: softprops/action-gh-release@v2
187+
with:
188+
files: |
189+
./wheelhouse/*
190+
tag_name: v${{ needs.build-python.outputs.version }}
191+
prerelease: ${{github.ref != 'refs/heads/main'}}
192+
generate_release_notes: true
193+
target_commitish: ${{ github.sha }}

0 commit comments

Comments
 (0)