diff --git a/.woodpecker/deploy.yml b/.woodpecker/deploy.yml index 4285e22..284afc8 100644 --- a/.woodpecker/deploy.yml +++ b/.woodpecker/deploy.yml @@ -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 ]