Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.5.1 #187

Merged
merged 9 commits into from
Jan 9, 2024
41 changes: 25 additions & 16 deletions .github/workflows/assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,21 @@ jobs:
- 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:
Expand Down Expand Up @@ -88,19 +90,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:
Expand Down Expand Up @@ -151,19 +155,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:
Expand All @@ -190,19 +196,22 @@ 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)" >> $env:GITHUB_OUTPUT
echo "WHEEL_NAME=$(Get-ChildItem -name *.whl)" >> $env:GITHUB_ENV
shell: powershell
- 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:
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [ 0.5.1 ] - [ 2024-01-08 ]

### Added

### Changed

- Fixed `upload-release-asset` steps in `.github/workflow/assets.yml`.
- Updated `RELEASE.md`.

### Removed

## [ 0.5.0 ] - [ 2023-12-16 ]

### Added
Expand Down
52 changes: 25 additions & 27 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,39 @@
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 `setup.py` (this is the only place where the version
is hardcoded) and change any other files where applicable (changelog, etc),
then commit and make a PR for it.
- Change the version in `include/version.hpp` (this is the only 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.

- 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/version.hpp`.
For example:

- Draft a new release through the GitHub interface. Set the "tag version"
to the same version you put in `setup.py`, the title to
"Release `version`: `name`", and write a short changelog in the body.
For releases that don't go to master, check the "prerelease" box, so it
won't show up as the latest release.
```
git tag 0.0.1
git push origin 0.0.1
```

- 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.
- Draft a new release through the GitHub interface.
Set the "tag version", and the title to "Release `version`: `name`".
And write a short change log in the body.

- 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.
4 changes: 2 additions & 2 deletions include/version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once

#define LIBQASM_VERSION "0.5.0"
#define LIBQASM_RELEASE_YEAR "2023"
#define LIBQASM_VERSION "0.5.1"
#define LIBQASM_RELEASE_YEAR "2024"