11---
2- - name : " Upload Assets"
3- hosts : " all"
2+ - name : Upload Assets
3+ hosts : all
44 vars :
5+ just_version : " 1.37.0"
56 install_dir : " {{ ansible_user_dir }}/.local/bin"
67 is_pr : true # Set to False for Runs after merge.
78 registry_credentials :
1213 environment :
1314 PATH : " {{ install_dir }}:{{ ansible_env.PATH }}"
1415 tasks :
15- - name : " Install Just"
16- ansible.builtin.command :
17- cmd : " curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to {{ ansible_user_dir }}/.local/bin/"
18- creates : " {{ ansible_user_dir }}/.local/bin/just"
19- - name : " Ensure just env file"
16+ - name : Install just
17+ ansible.builtin.unarchive :
18+ src : " https://github.com/casey/just/releases/download/{{ just_version }}/just-{{ just_version }}-x86_64-unknown-linux-musl.tar.gz"
19+ dest : " {{ install_dir }}"
20+ extra_opts : " --strip-components=1"
21+ mode : " +x"
22+ remote_src : true
23+ args :
24+ creates : " {{ install_dir }}/just"
25+ - name : Ensure just env file
2026 ansible.builtin.copy :
21- src : " {{ zuul.project.src_dir}}/just.env.example"
22- dest : " {{ zuul.project.src_dir}}/just.env"
23- - name : " Set Enviroments variables for just"
27+ src : " just.env.example"
28+ dest : " just.env"
29+ mode : preserve
30+ - name : Set Enviroments variables for just
2431 ansible.builtin.lineinfile :
25- path : " {{ zuul.project.src_dir}}/ just.env"
26- regexp : ' ^{{ item.key }}='
32+ path : " just.env"
33+ regexp : " ^{{ item.key }}="
2734 line : " {{ item.key }}={{ item.value }}"
28- loop : " {{registry_credentials | dict2items }}"
29- - name : " Upload Preliminary Assets"
35+ loop : " {{ registry_credentials | dict2items }}"
36+ - name : Upload Preliminary Assets
3037 ansible.builtin.command :
31- cmd : " just --working-directory {{ zuul.project.src_dir}} --just-file {{ zuul.project.src_dir}}/justfile publish-test-release"
38+ cmd : " just publish-test-release"
3239 when : is_pr
33- - name : " Upload Release Assets"
40+ changed_when : false
41+ - name : Upload Release Assets
3442 ansible.builtin.command :
35- cmd : " just --yes --working-directory {{ zuul.project.src_dir}} --just-file {{ zuul.project.src_dir}}/justfile publish-release"
43+ cmd : " just --yes publish-release"
3644 when : not is_pr
45+ changed_when : false
0 commit comments