Skip to content

Commit

Permalink
Fixing the release
Browse files Browse the repository at this point in the history
  • Loading branch information
farshadniayeshpour committed May 31, 2024
1 parent ff7c67e commit d5984d8
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 24 deletions.
3 changes: 3 additions & 0 deletions .github/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# config for release-please bot
primaryBranch: main
handleGHRelease: true
42 changes: 25 additions & 17 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-latest
environment:
name: pypi
# url: https://pypi.org/p/qref
url: https://test.pypi.org/p/qref
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
contents: write
pages: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand All @@ -22,24 +22,32 @@ jobs:
- name: Install pypa/build
run: python -m pip install build --user
- name: Setup poetry
uses: abatilo/actions-poetry@v2
uses: abatilo/[email protected]
with:
poetry-version: 1.8.3
- name: Install the packages required
run: poetry install --with docs
- name: Build the package
# run: poetry config pypi-token.pypi ${{ secrets.TWINE_PASSWORD }}
run: poetry config pypi-token.pypi ${{ secrets.TEST_TWINE_PASSWORD }}



- name: Publish the package
run: poetry publish --build
## Uncomment the below after IT trusted publisher pypi request has been submitted
# - name: Publish package distributions to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
run: poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/ # TODO: change to https://upload.pypi.org/legacy/ after testing
- name: Install mike
run: poetry run mkdocs build
# https://github.com/jimporter/mike/blob/master/README.md#deploying-via-ci
- name: Configure git
run: |
git config user.name PsiQ-Qref
git config user.email [email protected]
- name: Build docs
run: mike deploy $RELEASE_VERSION latest --update-aliases
run: poetry run mike deploy $RELEASE_VERSION latest -u
env:
RELEASE_VERSION: ${GITHUB_REF#refs/*/} # or #{{ github.ref }}

RELEASE_VERSION: ${{ github.ref_name }}
- name: Push docs
run: git push origin gh-pages:gh-pages
run: |
git pull -f origin gh-pages --rebase
git fetch origin gh-pages --depth=1
git push -f origin gh-pages:gh-pages
12 changes: 6 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ name: Release (Manual Trigger)
on:
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
release-please:
release-please-pr-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Increment version
- name: Increment version and create PR
uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: python
skip-github-release: false
skip-github-pull-request: true

# bumps z in x.y.z if the commit message is: "fix: blah blah blah" (patch)
# bumps y in x.y.z if the commit message is: "feature: blah blah blah" (minor)
# bumps x in x.y.z if the commit message is "fix! or feature!: blah blah blah" (major)
4 changes: 4 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
".": "0.1.13",
"skip-github-release": false
}
Empty file added CHANGELOG.md
Empty file.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "qref"
version = "0.0.0"
version = "0.1.1"
description = "Quantum Resource Estimation Format"
authors = ["PsiQuantum, Corp."]
license = "Apache 2.0"
Expand Down

0 comments on commit d5984d8

Please sign in to comment.