vieter/.woodpecker/.release.yml

40 lines
1.1 KiB
YAML
Raw Normal View History

2022-01-22 22:12:30 +01:00
# Yeah so this only works on tags so we'll worry about this later
2022-01-22 21:26:25 +01:00
platform: linux/amd64
2022-01-22 22:12:30 +01:00
branches: main
2022-01-22 21:26:25 +01:00
2022-01-22 21:54:03 +01:00
# We need the entire repo in order for the release names to work
2022-01-22 21:58:04 +01:00
skip_clone: true
2022-01-22 21:54:03 +01:00
2022-01-22 21:26:25 +01:00
pipeline:
prepare:
image: 'chewingbever/vlang:latest'
pull: true
2022-01-22 21:26:25 +01:00
secrets: [ s3_username, s3_password ]
commands:
2022-01-22 22:02:22 +01:00
- git clone "$CI_REPO_REMOTE" .
2022-01-22 21:54:03 +01:00
- git checkout "$CI_COMMIT_BRANCH"
2022-01-22 21:26:25 +01:00
# Write the title to a file that the plugin can then read
- echo "$(git describe --tags --abbrev=0 2> /dev/null || echo '0.0.0')-$(git rev-list --count ^dev)" > title
- cat title
2022-01-22 23:15:36 +01:00
- mc alias set s3/ https://s3.rustybever.be "$S3_USERNAME" "$S3_PASSWORD"
- mc cp -r "s3/vieter/commits/$CI_COMMIT_SHA" assets
2022-01-22 21:26:25 +01:00
release:
image: 'plugins/gitea-release'
secrets:
- gitea_release_api_key
settings:
base_url: https://git.rustybever.be
files: assets/*
checksums:
- md5
- sha256
prerelease: true
# This should get read in as a file
title: title
when:
event: push
depends_on:
- build