mirror of
https://codeberg.org/Cyborus/forgejo-cli.git
synced 2024-11-23 18:31:46 +01:00
Merge pull request 'run ci build on tag rather than deploy' (#41) from tag-build into main
Reviewed-on: https://codeberg.org/Cyborus/forgejo-cli/pulls/41
This commit is contained in:
commit
24ab090b55
1 changed files with 6 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
when:
|
||||
- event: deployment
|
||||
- event: tag
|
||||
steps:
|
||||
compile-linux:
|
||||
image: rust:latest
|
||||
|
@ -20,7 +20,9 @@ steps:
|
|||
commands:
|
||||
- apt update
|
||||
- apt install zip -y
|
||||
- zip forgejo-cli-windows.zip target/x86_64-pc-windows-gnu/release/fj.exe
|
||||
- cd target/x86_64-pc-windows-gnu/release
|
||||
- zip ../../../forgejo-cli-windows.zip fj.exe
|
||||
- cd ../../..
|
||||
- gzip -c target/x86_64-unknown-linux-gnu/release/fj > forgejo-cli-linux.gz
|
||||
deploy-container:
|
||||
image: gcr.io/kaniko-project/executor:debug
|
||||
|
@ -37,7 +39,8 @@ steps:
|
|||
commands:
|
||||
- export FORGE_HOST=$(echo $CI_FORGE_URL | sed -E 's_^https?://__')
|
||||
- fj auth add-key $FORGE_HOST $CI_REPO_OWNER $TOKEN
|
||||
- fj --remote $CI_REPO_URL release create $VERSION --create-tag --branch $BRANCH --attach forgejo-cli-windows.zip --attach forgejo-cli-linux.gz
|
||||
- fj release --repo $CI_REPO_URL asset create $CI_COMMIT_TAG forgejo-cli-windows.zip
|
||||
- fj release --repo $CI_REPO_URL asset create $CI_COMMIT_TAG forgejo-cli-linux.gz
|
||||
- fj auth logout $FORGE_HOST
|
||||
secrets: [ token ]
|
||||
|
||||
|
|
Loading…
Reference in a new issue