@@ -4,7 +4,7 @@ name: publish-casper-node-launcher
44on :
55 push :
66 tags :
7- - " v*"
7+ - " v*.*.* "
88
99jobs :
1010 publish_deb :
@@ -18,14 +18,13 @@ jobs:
1818
1919 steps :
2020 - uses : actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
21- - uses : Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # v1.4.0
2221
2322 - name : Install deps
2423 run : |
2524 echo "deb http://repo.aptly.info/ squeeze main" | sudo tee -a /etc/apt/sources.list.d/aptly.list
2625 wget -qO - https://www.aptly.info/pubkey.txt | sudo apt-key add -
2726 sudo apt-get update
28- sudo apt-get install -y awscli aptly=1.2 .0
27+ sudo apt-get install -y aptly=1.4 .0
2928 aptly config show
3029
3130 - name : Import GPG key
6463 PATHS : " /*"
6564 AWS_REGION : ${{ secrets.APTLY_REGION }}
6665 AWS_ACCESS_KEY_ID : ${{ secrets.APTLY_ACCESS_KEY }}
67- AWS_SECRET_ACCESS_KEY : ${{ secrets.APTLY_SECRET_KEY }}
66+ AWS_SECRET_ACCESS_KEY : ${{ secrets.APTLY_SECRET_KEY }}
67+
68+ ---
69+ name : publish-casper-sidecar-deb
70+ permissions :
71+ contents : read
72+ id-token : write
73+
74+ on :
75+ push :
76+ tags :
77+ - " v*.*.*"
78+
79+ jobs :
80+ publish_deb :
81+ strategy :
82+ matrix :
83+ include :
84+ - os : ubuntu-20.04
85+ code_name : focal
86+ # - os: ubuntu-22.04
87+ # code_name: jammy
88+ # - os: ubuntu-24.04
89+ # code_name: noble
90+
91+ runs-on : ${{ matrix.os }}
92+
93+ steps :
94+ - uses : actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
95+
96+ - name : Configure AWS credentials
97+ uses : aws-actions/configure-aws-credentials@v4
98+ with :
99+ role-to-assume : ${{ secrets.AWS_ACCESS_ROLE_REPO }}
100+ role-session-name : GitHub_to_AWS_via_FederatedOIDC
101+ aws-region : ${{ secrets.AWS_ACCESS_REGION_REPO }}
102+
103+ - name : Install deps
104+ run : |
105+ echo "deb http://repo.aptly.info/ squeeze main" | sudo tee -a /etc/apt/sources.list.d/aptly.list
106+ wget -qO - https://www.aptly.info/pubkey.txt | sudo apt-key add -
107+ sudo apt-get update
108+ sudo apt-get install -y aptly=1.4.0
109+ aptly config show
110+
111+ - name : update toolchain
112+ run : rustup update nightly
113+
114+ - name : Import GPG key
115+ uses : crazy-max/ghaction-import-gpg@c8bb57c57e8df1be8c73ff3d59deab1dbc00e0d1 # v5.1.0
116+ with :
117+ gpg_private_key : ${{ secrets.APTLY_GPG_KEY }}
118+ passphrase : ${{ secrets.APTLY_GPG_PASS }}
119+
120+ - name : Install cargo deb
121+ run : cargo install cargo-deb
122+
123+ - name : Cargo deb
124+ run : cargo deb --package casper-sidecar --variant ${{ matrix.code_name }}
125+
126+ - name : Upload binaries to repo
127+ env :
128+ PLUGIN_REPO_NAME : ${{ secrets.AWS_BUCKET_REPO }}
129+ PLUGIN_REGION : ${{ secrets.AWS_ACCESS_REGION_REPO }}
130+ PLUGIN_GPG_KEY : ${{ secrets.APTLY_GPG_KEY }}
131+ PLUGIN_GPG_PASS : ${{ secrets.APTLY_GPG_PASS }}
132+ PLUGIN_ACL : ' private'
133+ PLUGIN_PREFIX : ' releases'
134+ PLUGIN_DEB_PATH : ' ./target/debian'
135+ PLUGIN_OS_CODENAME : ${{ matrix.code_name }}
136+ run : ./ci/publish_deb_to_repo.sh
137+
138+ - name : Invalidate CloudFront cache
139+ run : |
140+ aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_REPO }} --paths "/*"
0 commit comments