Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 52 additions & 52 deletions .woodpecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,61 +279,61 @@ steps:
evaluate: '"${CI_COMMIT_TAG}" matches ''^([0-9]+)\\\.([0-9]+)\\\.([0-9]+)(-beta\\\.[0-9]+)?$'''

# Only publish arm builds on non-pre-release builds
publish_release_docker_amd64:
image: woodpeckerci/plugin-docker-buildx
settings:
repo: dessalines/lemmy
dockerfile: docker/Dockerfile
username:
from_secret: docker_username
password:
from_secret: docker_password
platforms: linux/amd64
build_args:
RUST_RELEASE_MODE: release
build_args_from_env:
- CI_PIPELINE_EVENT
tag: ${CI_COMMIT_TAG=nightly}
when:
- event: [tag, cron]
# publish_release_docker_amd64:
# image: woodpeckerci/plugin-docker-buildx
# settings:
# repo: dessalines/lemmy
# dockerfile: docker/Dockerfile
# username:
# from_secret: docker_username
# password:
# from_secret: docker_password
# platforms: linux/amd64
# build_args:
# RUST_RELEASE_MODE: release
# build_args_from_env:
# - CI_PIPELINE_EVENT
# tag: ${CI_COMMIT_TAG=nightly}
# when:
# - event: [tag, cron]

# lemmy container doesnt run as root so we need to change permissions to let it copy the binary
chmod_for_native_binary:
image: alpine:3
commands:
- chmod 777 .
when:
- event: tag
# chmod_for_native_binary:
# image: alpine:3
# commands:
# - chmod 777 .
# when:
# - event: tag

# extract lemmy binary from newly built docker image into workspace folder
extract_native_binary:
image: dessalines/lemmy:${CI_COMMIT_TAG=default}
commands:
- cp /usr/local/bin/lemmy_server .
when:
- event: tag

prepare_native_binary:
image: alpine:3
commands:
- sha256sum lemmy_server > sha256sum.txt
- gzip lemmy_server
when:
- event: tag

# https://woodpecker-ci.org/plugins/Release
publish_native_binary:
image: woodpeckerci/plugin-release
settings:
files:
- lemmy_server.gz
- sha256sum.txt
title: ${CI_COMMIT_TAG}
prerelease: true
api-key:
from_secret: github_token
when:
- event: tag
# extract_native_binary:
# image: dessalines/lemmy:${CI_COMMIT_TAG=default}
# commands:
# - cp /usr/local/bin/lemmy_server .
# when:
# - event: tag

# prepare_native_binary:
# image: alpine:3
# commands:
# - sha256sum lemmy_server > sha256sum.txt
# - gzip lemmy_server
# when:
# - event: tag

# # https://woodpecker-ci.org/plugins/Release
# publish_native_binary:
# image: woodpeckerci/plugin-release
# settings:
# files:
# - lemmy_server.gz
# - sha256sum.txt
# title: ${CI_COMMIT_TAG}
# prerelease: true
# api-key:
# from_secret: github_token
# when:
# - event: tag
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to revert these changes, otherwise looks good to merge.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

K done.


publish_to_crates_io:
image: *rust_image
Expand All @@ -343,7 +343,7 @@ steps:
commands:
- *install_binstall
- cp -r migrations crates/db_schema/
- cargo publish --workspace --token "$CARGO_API_TOKEN" --from-git --allow-dirty --no-verify --allow-branch "${CI_COMMIT_TAG}" --yes custom "${CI_COMMIT_TAG}"
- cargo publish --workspace --token "$CARGO_API_TOKEN" --allow-dirty --no-verify
when:
- event: tag

Expand Down
Loading