Skip to content

Commit

Permalink
ci: Add release workflow (#169)
Browse files Browse the repository at this point in the history
* Add release workflow

* Add release dryrun

* Correct yaml

* Remove skip existing
  • Loading branch information
daniel-mills-cqc authored Nov 29, 2024
1 parent cc6ea2b commit 4fae192
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ jobs:
cd tests
pytest --cov-report term-missing:skip-covered --cov=qermit --durations=10
publish:
name: Test publication
runs-on: ubuntu-latest

steps:

- name: Checkout Qermit
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Publish Qermit Dry Run
run: poetry publish -u __token__ -p ${{ secrets.PYPI_RELEASE_TOKEN }} --build --skip-existing --dry-run

build-docs:
name: Test documentation build
runs-on: ubuntu-latest
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release
on:
workflow_dispatch: {}
# Runs when a version tag is pushed
push:
tags:
- v**

# Safeguard to avoid having multiple deployments running concurrently
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
Release:
runs-on: ubuntu-latest

steps:

- name: Checkout Qermit
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Publish Qermit
run: poetry publish -u __token__ -p ${{ secrets.PYPI_RELEASE_TOKEN }} --build
1 change: 0 additions & 1 deletion _version.py

This file was deleted.

0 comments on commit 4fae192

Please sign in to comment.