Skip to content

Commit

Permalink
Change action behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterpeere committed Jan 26, 2024
1 parent ed71ba1 commit f46a523
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 74 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
name: CD to pypi

on:
push:
branches:
- master

permissions:
contents: write
release:
types: [ published, unpublished ]

jobs:
build:
if: "contains(github.event.head_commit.message, 'auto-update version')"
name: Build distribution 📦
runs-on: ubuntu-latest

Expand All @@ -36,7 +31,7 @@ jobs:

publish-to-testpypi:
needs: build
if: "contains(github.event.head_commit.message, 'rc') || contains(github.event.head_commit.message, 'dev')"
if: "contains(github.event.release.name, 'rc') || contains(github.event.release.name, 'dev')"
name: Publish 📦 to TestPyPI
runs-on: ubuntu-latest

Expand All @@ -59,7 +54,7 @@ jobs:

publish-to-pypi:
needs: build
if: "!contains(github.event.head_commit.message, 'rc') && !contains(github.event.head_commit.message, 'dev')"
if: "!contains(github.event.release.name, 'rc') && !contains(github.event.release.name, 'dev')"
name: Publish 📦 to PyPI
runs-on: ubuntu-latest

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Create docs
on: [push, release]
on: push

jobs:
notebooks:
Expand Down
64 changes: 0 additions & 64 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit f46a523

Please sign in to comment.