mirror of
https://codeberg.org/Cyborus/forgejo-cli.git
synced 2024-11-10 12:09:33 +01:00
run ci build on tag rather than deploy
This commit is contained in:
parent
7fca58fde6
commit
88b801a7e6
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