Skip to content

Commit

Permalink
add pre-release CI flow
Browse files Browse the repository at this point in the history
  • Loading branch information
olofvndrhr committed Feb 12, 2023
1 parent d64964e commit bc2f856
Show file tree
Hide file tree
Showing 10 changed files with 122 additions and 49 deletions.
8 changes: 3 additions & 5 deletions .woodpecker/publish_docker_amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,18 @@ depends_on:

clone:
git:
image: woodpeckerci/plugin-git:v1.6.0
when:
#branch: master
event: tag
image: woodpeckerci/plugin-git:v1.6.0

pipeline:

# build and publish docker image for amd64 - x86
build-amd64:
when:
#branch: master
event: tag
image: plugins/docker
pull: true
when:
event: tag
settings:
repo: olofvndrhr/manga-dlp
platforms: linux/amd64
Expand Down
8 changes: 3 additions & 5 deletions .woodpecker/publish_docker_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,18 @@ depends_on:

clone:
git:
image: woodpeckerci/plugin-git:v1.6.0
when:
#branch: master
event: tag
image: woodpeckerci/plugin-git:v1.6.0

pipeline:

# build and publish docker image for arm64
build-arm64:
when:
#branch: master
event: tag
image: plugins/docker
pull: true
when:
event: tag
settings:
repo: olofvndrhr/manga-dlp
platforms: linux/arm64
Expand Down
8 changes: 3 additions & 5 deletions .woodpecker/publish_docker_manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,18 @@ depends_on:

clone:
git:
image: woodpeckerci/plugin-git:v1.6.0
when:
#branch: master
event: tag
image: woodpeckerci/plugin-git:v1.6.0

pipeline:

# publish docker manifest for automatic multi arch pulls
publish-manifest:
when:
#branch: master
event: tag
image: plugins/manifest
pull: true
when:
event: tag
settings:
spec: docker/manifest.tmpl
auto_tag: true
Expand Down
85 changes: 85 additions & 0 deletions .woodpecker/publish_pre_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
###################
# publish pre-release #
###################
# branch: dev
# event: tag

platform: linux/amd64

depends_on:
- tests

clone:
git:
image: woodpeckerci/plugin-git:v1.6.0
when:
event: tag
tag: "*-dev"

pipeline:

# build wheel and dist
build-pypi:
image: cr.44net.ch/ci-plugins/tests
pull: true
when:
event: tag
tag: "*-dev"
commands:
- python3 -m hatch build --clean

# create pre-release-notes
create-pre-release-notes:
image: cr.44net.ch/baseimages/debian-base
pull: true
when:
event: tag
tag: "*-dev"
commands:
- bash get_release_notes.sh ${CI_COMMIT_TAG%%-dev}

# publish pre-release on gitea (git.44net.ch/olofvndrhr/manga-dlp)
publish-pre-release-gitea:
image: plugins/gitea-release
pull: true
when:
event: tag
tag: "*-dev"
settings:
api_key:
from_secret: gitea-olofvndrhr-token
base_url: https://git.44net.ch
files: dist/*
title: ${CI_COMMIT_TAG}
note: RELEASENOTES.md
prerelease: true

# publish pre-release on github (github.com/olofvndrhr/manga-dlp)
publish-pre-release-github:
image: plugins/github-release
pull: true
when:
event: tag
tag: "*-dev"
settings:
api_key:
from_secret: github-olofvndrhr-token
files: dist/*
title: ${CI_COMMIT_TAG}
note: RELEASENOTES.md
prerelease: true

# # pre-release pypi
# pre-release-pypi:
# image: cr.44net.ch/ci-plugins/tests
# pull: true
# when:
# event: tag
# tag: "*-dev"
# secrets:
# - source: pypi_username
# target: HATCH_INDEX_USER
# - source: pypi_token
# target: HATCH_INDEX_AUTH
# commands:
# - python3 -m hatch publish --no-prompt --yes
28 changes: 11 additions & 17 deletions .woodpecker/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,36 @@ depends_on:

clone:
git:
image: woodpeckerci/plugin-git:v1.6.0
when:
#branch: master
event: tag
image: woodpeckerci/plugin-git:v1.6.0

pipeline:

# build wheel and dist
build-pypi:
when:
#branch: master
event: tag
image: cr.44net.ch/ci-plugins/tests
pull: true
when:
event: tag
commands:
- python3 -m hatch build --clean

# create release-notes
create-release-notes:
when:
#branch: master
event: tag
image: cr.44net.ch/baseimages/debian-base
pull: true
when:
event: tag
commands:
- bash get_release_notes.sh ${CI_COMMIT_TAG}

# publish release on gitea (git.44net.ch/olofvndrhr/manga-dlp)
publish-release-gitea:
when:
#branch: master
event: tag
image: plugins/gitea-release
pull: true
when:
event: tag
settings:
api_key:
from_secret: gitea-olofvndrhr-token
Expand All @@ -55,11 +51,10 @@ pipeline:

# publish release on github (github.com/olofvndrhr/manga-dlp)
publish-release-github:
image: plugins/github-release
pull: true
when:
#branch: master
event: tag
image: woodpeckerci/plugin-github-release
pull: true
settings:
api_key:
from_secret: github-olofvndrhr-token
Expand All @@ -69,11 +64,10 @@ pipeline:

# release pypi
release-pypi:
when:
#branch: master
event: tag
image: cr.44net.ch/ci-plugins/tests
pull: true
when:
event: tag
secrets:
- source: pypi_username
target: HATCH_INDEX_USER
Expand Down
6 changes: 3 additions & 3 deletions .woodpecker/test_docker_amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ depends_on:

clone:
git:
image: woodpeckerci/plugin-git:v1.6.0
when:
branch: master
event: pull_request
image: woodpeckerci/plugin-git:v1.6.0

pipeline:

# build docker image for amd64 - x86
test-build-amd64:
image: plugins/docker
pull: true
when:
branch: master
event: pull_request
image: plugins/docker
pull: true
settings:
dry_run: true
repo: olofvndrhr/manga-dlp
Expand Down
6 changes: 3 additions & 3 deletions .woodpecker/test_docker_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ depends_on:

clone:
git:
image: woodpeckerci/plugin-git:v1.6.0
when:
branch: master
event: pull_request
image: woodpeckerci/plugin-git:v1.6.0

pipeline:

# build docker image for arm64
test-build-arm64:
image: plugins/docker
pull: true
when:
branch: master
event: pull_request
image: plugins/docker
pull: true
settings:
dry_run: true
repo: olofvndrhr/manga-dlp
Expand Down
10 changes: 5 additions & 5 deletions .woodpecker/test_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,30 @@ depends_on:

clone:
git:
image: woodpeckerci/plugin-git:v1.6.0
when:
branch: master
event: pull_request
image: woodpeckerci/plugin-git:v1.6.0

pipeline:

# build wheel and dist
test-build-pypi:
image: cr.44net.ch/ci-plugins/tests
pull: true
when:
branch: master
event: pull_request
image: cr.44net.ch/ci-plugins/tests
pull: true
commands:
- python3 -m hatch build --clean

# create release-notes
test-create-release-notes:
image: cr.44net.ch/baseimages/debian-base
pull: true
when:
branch: master
event: pull_request
image: cr.44net.ch/baseimages/debian-base
pull: true
commands:
- bash get_release_notes.sh latest
- cat RELEASENOTES.md
6 changes: 3 additions & 3 deletions .woodpecker/test_tox_amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ depends_on:

clone:
git:
image: woodpeckerci/plugin-git:v1.6.0
when:
branch: master
event: pull_request
image: woodpeckerci/plugin-git:v1.6.0

pipeline:

# test code with different python versions - amd64
test-tox-amd64:
image: cr.44net.ch/ci-plugins/multipy
pull: true
when:
branch: master
event: pull_request
image: cr.44net.ch/ci-plugins/multipy
pull: true
commands:
- python3 -m tox
6 changes: 3 additions & 3 deletions .woodpecker/test_tox_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ depends_on:

clone:
git:
image: woodpeckerci/plugin-git:v1.6.0
when:
branch: master
event: pull_request
image: woodpeckerci/plugin-git:v1.6.0

pipeline:

# test code with different python versions - arm64
test-tox-arm64:
image: cr.44net.ch/ci-plugins/multipy
pull: true
when:
branch: master
event: pull_request
image: cr.44net.ch/ci-plugins/multipy
pull: true
commands:
- grep -v img2pdf contrib/requirements_dev.txt > contrib/requirements_dev_arm64.txt
- rm -f contrib/requirements_dev.txt
Expand Down

0 comments on commit bc2f856

Please sign in to comment.