From 077dba51da68e3f9675786388e3279ea5e140f0d Mon Sep 17 00:00:00 2001 From: rturrado <68099809+rturrado@users.noreply.github.com> Date: Mon, 8 Jan 2024 16:27:09 +0100 Subject: [PATCH] Fix `upload-release-asset` steps in `assets.yml`. Update `RELEASE.md`, removing references to conda. Update `CHANGELOG.md`. Update version to 0.12.1. --- .github/workflows/assets.yml | 44 +++++++++++++--------- CHANGELOG.md | 11 +++++- RELEASE.md | 72 +++++++++++++++++------------------- include/ql/version.h | 3 +- 4 files changed, 71 insertions(+), 59 deletions(-) diff --git a/.github/workflows/assets.yml b/.github/workflows/assets.yml index fa3f004da..6246edc24 100644 --- a/.github/workflows/assets.yml +++ b/.github/workflows/assets.yml @@ -34,27 +34,29 @@ jobs: - name: Install dependencies run: | brew install bison flex swig xquartz - echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH - echo "/usr/local/opt/flex/bin" >> $GITHUB_PATH + echo "/usr/local/opt/bison/bin" >> "$GITHUB_PATH" + echo "/usr/local/opt/flex/bin" >> "$GITHUB_PATH" python -m pip install --upgrade pip conan setuptools wheel - name: Build wheel run: python setup.py bdist_wheel - name: Wheel path id: wheel working-directory: pybuild/dist/ - run: echo "{wheel}={$(ls *.whl)}" >> $GITHUB_OUTPUT + run: | + echo "WHEEL_NAME=$(ls *.whl)" >> "$GITHUB_OUTPUT" + echo "WHEEL_NAME=$(ls *.whl)" >> "$GITHUB_ENV" - uses: actions/upload-artifact@v3 with: name: pypi-macos-py${{ matrix.python }} - path: pybuild/dist/${{ steps.wheel.outputs.wheel }} + path: pybuild/dist/${{ env.WHEEL_NAME }} - uses: actions/upload-release-asset@v1 if: ${{ github.event_name == 'release' && github.event.action == 'created' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: pybuild/dist/${{ steps.wheel.outputs.wheel }} - asset_name: ${{ steps.wheel.outputs.wheel }} + asset_path: pybuild/dist/${{ env.WHEEL_NAME }} + asset_name: ${{ env.WHEEL_NAME }} asset_content_type: application/zip manylinux-x64: @@ -94,19 +96,21 @@ jobs: - name: Wheel path id: wheel working-directory: wheelhouse - run: echo "{wheel}={$(ls *.whl)}" >> $GITHUB_OUTPUT + run: | + echo "WHEEL_NAME=$(ls *.whl)" >> "$GITHUB_OUTPUT" + echo "WHEEL_NAME=$(ls *.whl)" >> "$GITHUB_ENV" - uses: actions/upload-artifact@v3 with: name: pypi-linux-${{ matrix.cpython_version }} - path: wheelhouse/${{ steps.wheel.outputs.wheel }} + path: wheelhouse/${{ env.WHEEL_NAME }} - uses: actions/upload-release-asset@v1 if: ${{ github.event_name == 'release' && github.event.action == 'created' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: wheelhouse/${{ steps.wheel.outputs.wheel }} - asset_name: ${{ steps.wheel.outputs.wheel }} + asset_path: wheelhouse/${{ env.WHEEL_NAME }} + asset_name: ${{ env.WHEEL_NAME }} asset_content_type: application/zip manylinux-arm64: @@ -157,19 +161,21 @@ jobs: - name: Wheel path id: wheel working-directory: wheelhouse - run: echo "{wheel}={$(ls *.whl)}" >> $GITHUB_OUTPUT + run: | + echo "WHEEL_NAME=$(ls *.whl)" >> "$GITHUB_OUTPUT" + echo "WHEEL_NAME=$(ls *.whl)" >> "$GITHUB_ENV" - uses: actions/upload-artifact@v3 with: name: pypi-linux-${{ matrix.cpython_version }} - path: wheelhouse/${{ steps.wheel.outputs.wheel }} + path: wheelhouse/${{ env.WHEEL_NAME }} - uses: actions/upload-release-asset@v1 if: ${{ github.event_name == 'release' && github.event.action == 'created' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: wheelhouse/${{ steps.wheel.outputs.wheel }} - asset_name: ${{ steps.wheel.outputs.wheel }} + asset_path: wheelhouse/${{ env.WHEEL_NAME }} + asset_name: ${{ env.WHEEL_NAME }} asset_content_type: application/zip windows-x64: @@ -197,19 +203,21 @@ jobs: - name: Wheel path id: wheel working-directory: pybuild/dist/ - run: echo "{wheel}={$(Get-ChildItem -name *.whl)}" >> $GITHUB_OUTPUT + run: | + echo "WHEEL_NAME=$(Get-ChildItem -name *.whl)" >> "$GITHUB_OUTPUT" + echo "WHEEL_NAME=$(Get-ChildItem -name *.whl)" >> "$GITHUB_ENV" - uses: actions/upload-artifact@v3 with: name: pypi-windows-py${{ matrix.python }} - path: pybuild/dist/${{ steps.wheel.outputs.wheel }} + path: pybuild/dist/${{ env.WHEEL_NAME }} - uses: actions/upload-release-asset@v1 if: ${{ github.event_name == 'release' && github.event.action == 'created' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: pybuild/dist/${{ steps.wheel.outputs.wheel }} - asset_name: ${{ steps.wheel.outputs.wheel }} + asset_path: pybuild/dist/${{ env.WHEEL_NAME }} + asset_name: ${{ env.WHEEL_NAME }} asset_content_type: application/zip publish: diff --git a/CHANGELOG.md b/CHANGELOG.md index af6bf6f9d..a86f86ba8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [ 0.12.1 ] - [ 2024-01-08 ] + +### Added + +### Changed + +- Fixed `upload-release-asset` steps in `.github/workflow/assets.yml`. +- Updated `RELEASE.md`. + + ## [ 0.12.0 ] - [ 2023-12-18 ] ### Added - Conan as package manager @@ -23,7 +33,6 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Option to enable/disable debug symbols, enabled by default ### Changed -- ### Removed - Debug symbols in Python wheels, because of size limitation on PyPI diff --git a/RELEASE.md b/RELEASE.md index 98eb16505..032ea0dd1 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,58 +1,52 @@ Release procedure ================= -Most of the release process is managed by GitHub Actions. If you follow the -procedure below, it will automatically test and build all wheels and conda -packages for all platform, and publish them to PyPI and conda assuming the -secrets are configured correctly. +Most of the release process is managed by GitHub Actions. If you follow the procedure below, +it will automatically test and build all wheels for all platforms, +and publish them to PyPI assuming the secrets are configured correctly. - - Make a branch with a name starting with "release" based upon the commit that - is to be released. For example, `release-0.0.1`, but the suffix doesn't - matter. + - Make a branch with a name starting with "release" based upon the commit that is to be released. + For example, `release-0.0.1`, but the suffix doesn't matter. - - Change the version in `include/ql/version.h` (this is the only functional - place where the version is hardcoded) and change any other files where - applicable (changelog, etc) and update `CHANGELOG.md` accordingly, then - commit and make a PR for it. + - Change the version in `include/ql/version.h` (this is the only functional place where the version is hardcoded) + and change any other files where applicable (`CHANGELOG.md`, etc.), then commit and make a PR for it. - CI will now run not only the test workflow, but also the assets workflow. - The assets workflow builds the wheels and conda packages, but publishes them - to the GitHub Actions build artifacts only. You can then test these yourself - if you have reason to believe that something might be wrong with them that - CI might not catch. To find them, go to Actions -> Assets workflow -> - click the run for your branch -> Artifacts. + The assets workflow builds the wheels, but publishes them to the GitHub Actions build artifacts only. + You can then test these yourself if you have reason to believe that + something might be wrong with them that CI might not catch. + To find them, go to Actions -> Assets workflow -> click the run for your branch -> Artifacts. - - Always delete the artifacts of the assets runs when you're done with them - or don't need them! OpenQL's binaries are quite big, so if you don't do - this, GitHub will soon start rejecting new artifacts due to storage quota. + - Always delete the artifacts of the assets runs when you're done with them or don't need them! + OpenQL's binaries are quite big, so if you don't do this, + GitHub will soon start rejecting new artifacts due to storage quota. - - If the test or assets workflows fail, fix it before merging the PR (of - course). + - If the test or assets workflows fail, fix it before merging the PR (of course). - Once CI is green, merge the PR into `develop` if there are any changes. If no changes were needed, just delete the branch to clean up. - - If needed, also merge to `master`. + - Create and push a new tag using the same version you put in `include/ql/version.h`. + For example: - - Draft a new release through the GitHub interface. Set the "tag version" - to the same version you put in `include/ql/version.h`, the title to - "Release `version`: `name`", and write release notes in the body. The - release notes should include at least: + ``` + git tag 0.0.1 + git push origin 0.0.1 + ``` - - a summary of what has changed, what is new, and what is incompatible - with the previous version; - - if there are incompatibilities, what the user can do for mitigation; - and + - Draft a new release through the GitHub interface. + Set the "tag version", and the title to "Release `version`: `name`". + And write release notes in the body, including at least: + + - a summary of what has changed, what is new, and what is incompatible with the previous version; + - if there are incompatibilities, what the user can do for mitigation; and - what has been deprecated and may be removed in a later version. - In principle, these things apply only to the public API. For releases that - don't go to master, check the "prerelease" box, so it won't show up as the - latest release. + In principle, these things apply only to the public API. - - CI will run the assets workflow again, now with the new version string baked - into the wheels and packages. When done, these wheels and packages are - automatically added to the GitHub release, and if the secrets/API keys for - PyPI and conda are correct, CI will publish them there. + - CI will run the assets workflow again, now with the new version string baked into the wheels. + When done, these wheels are automatically added to the GitHub release, + and if the secrets/API keys for PyPI are correct, CI will publish them there. - - Remove the temporary `release-*` branch. Users can find particular releases - via the tag that GitHub automatically added when you drafted the release. + - Remove the temporary `release-*` branch. + Users can find particular releases via the tag that GitHub automatically added when you drafted the release. diff --git a/include/ql/version.h b/include/ql/version.h index 0dc1b95ce..4e560ef56 100644 --- a/include/ql/version.h +++ b/include/ql/version.h @@ -7,4 +7,5 @@ * * OPENQL_VERSION_STRING is also decoded by version.py */ -#define OPENQL_VERSION_STRING "0.12.0" + +#define OPENQL_VERSION_STRING "0.12.1"