ci: release to crates.io and Codeberg through a release-plz pull request

This commit is contained in:
Willem Vanhulle committed 2026-10-25 12:03:40 +01:00
1 parent 3a61dc9279
commit 9fa6e26d52
4 files changed
+132 -4

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
when:
- repo: wvhulle/bootvine
event: [push, manual]
branch: main
depends_on:
- rust-and-flake-checks
clone:
- name: clone-with-history-and-tags
image: woodpeckerci/plugin-git
settings:
depth: 0
partial: false
tags: true
variables:
- &release_env
NIX_CONFIG: |
experimental-features = nix-command flakes
build-users-group =
accept-flake-config = true
GIT_AUTHOR_NAME: release-plz
GIT_AUTHOR_EMAIL: willemvanhulle@protonmail.com
GIT_COMMITTER_NAME: release-plz
GIT_COMMITTER_EMAIL: willemvanhulle@protonmail.com
CODEBERG_TOKEN:
from_secret: codeberg_token
CARGO_REGISTRY_TOKEN:
from_secret: cargo_registry_token
steps:
- name: publish-crate-and-tag-release
image: nixos/nix:latest
environment: *release_env
commands:
- git remote set-url origin "https://wvhulle:$${CODEBERG_TOKEN}@codeberg.org/$${CI_REPO}.git"
- git checkout -B main "$${CI_COMMIT_SHA}"
- nix run .#release-plz-release
- name: update-release-pr
image: nixos/nix:latest
environment: *release_env
commands:
- nix run .#release-plz-release-pr