@@ -106,13 +106,6 @@ jobs:
106106 asset_content_type : application/octet-stream
107107 - name : Rename dg binary
108108 run : mv src-tauri/target/release/dg dg-linux-${{ env.VERSION }}_${{ matrix.deb_arch }}
109- - name : Tar dg binary
110- uses : a7ul/tar-action@v1.2.0
111- with :
112- command : c
113- files : |
114- dg-linux-${{ env.VERSION }}_${{ matrix.deb_arch }}
115- outPath : dg-linux-${{ env.VERSION }}_${{ matrix.deb_arch }}_ubuntu-22-04-lts.tar.gz
116109 - name : Build dg deb
117110 uses : defGuard/fpm-action@main
118111 with :
@@ -127,17 +120,18 @@ jobs:
127120 asset_path : dg-linux-${{ env.VERSION }}_${{ matrix.deb_arch }}_ubuntu-22-04-lts.deb
128121 asset_name : dg-linux-${{ env.VERSION }}_${{ matrix.deb_arch }}_ubuntu-22-04-lts.deb
129122 asset_content_type : application/octet-stream
130- # - name: Install ruby with deb-s3
131- # if: matrix.build != 'freebsd'
132- # run: |
133- # apt-get install -y ruby
134- # gem install deb-s3
135- # echo "$(ruby -r rubygems -e 'puts Gem.user_dir')/bin" >> $GITHUB_PATH
136- # - name: Upload DEB to APT repository
137- # run: |
138- # COMPONENT=$([[ "${{ github.ref_name }}" == *"-"* ]] && echo "pre-release" || echo "release") # if tag contain "-" assume it's pre-release.
123+ - name : Install ruby with deb-s3
124+ if : matrix.build != 'freebsd'
125+ run : |
126+ apt-get install -y ruby
127+ gem install deb-s3
128+ echo "$(ruby -r rubygems -e 'puts Gem.user_dir')/bin" >> $GITHUB_PATH
129+ - name : Upload DEB to APT repository
130+ run : |
131+ COMPONENT=$([[ "${{ github.ref_name }}" == *"-"* ]] && echo "pre-release" || echo "release") # if tag contain "-" assume it's pre-release.
139132
140- # deb-s3 upload -l --bucket=apt.defguard.net --access-key-id=${{ secrets.AWS_ACCESS_KEY_APT }} --secret-access-key=${{ secrets.AWS_SECRET_KEY_APT }} --s3-region=eu-north-1 --no-fail-if-exists --codename=bookworm --component="$COMPONENT" src-tauri/target/release/bundle/deb/defguard-client_${{ env.VERSION }}_${{ matrix.deb_arch }}.deb
133+ deb-s3 upload -l --bucket=apt.defguard.net --access-key-id=${{ secrets.AWS_ACCESS_KEY_APT }} --secret-access-key=${{ secrets.AWS_SECRET_KEY_APT }} --s3-region=eu-north-1 --no-fail-if-exists --codename=bookworm --component="$COMPONENT" src-tauri/target/release/bundle/deb/Defguard_${{ env.VERSION }}_${{ matrix.deb_arch }}.deb
134+ deb-s3 upload -l --bucket=apt.defguard.net --access-key-id=${{ secrets.AWS_ACCESS_KEY_APT }} --secret-access-key=${{ secrets.AWS_SECRET_KEY_APT }} --s3-region=eu-north-1 --no-fail-if-exists --codename=bookworm --component="$COMPONENT" dg-linux-${{ env.VERSION }}_${{ matrix.deb_arch }}_ubuntu-22-04-lts.deb
141135
142136 # build-linux:
143137 # needs:
@@ -320,39 +314,39 @@ jobs:
320314 # asset_name: dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.rpm
321315 # asset_content_type: application/octet-stream
322316
323- # apt-sign:
324- # needs: #Add needs: -ubuntu-22-04-build (on merge dev -> main)
325- # - build-linux
326- # runs-on:
327- # - self-hosted
328- # - Linux
329- # - X64
330- # steps:
331- # - name: Sign APT repository
332- # run: |
333- # export AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_APT }}
334- # export AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_KEY_APT }}
335- # export AWS_REGION=eu-north-1
336- # sudo apt update -y
337- # sudo apt install -y awscli curl jq
317+ apt-sign :
318+ needs :
319+ - build-linux
320+ runs-on :
321+ - self-hosted
322+ - Linux
323+ - X64
324+ steps :
325+ - name : Sign APT repository
326+ run : |
327+ export AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_APT }}
328+ export AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_KEY_APT }}
329+ export AWS_REGION=eu-north-1
330+ sudo apt update -y
331+ sudo apt install -y awscli curl jq
338332
339- # for DIST in trixie bookworm; do
340- # aws s3 cp s3://apt.defguard.net/dists/${DIST}/Release .
333+ for DIST in trixie bookworm; do
334+ aws s3 cp s3://apt.defguard.net/dists/${DIST}/Release .
341335
342- # curl -X POST "${{ secrets.DEFGUARD_SIGNING_URL }}?signature_type=both" \
343- # -H "Authorization: Bearer ${{ secrets.DEFGUARD_SIGNING_API_KEY }}" \
344- # -F "file=@Release" \
345- # -o response.json
336+ curl -X POST "${{ secrets.DEFGUARD_SIGNING_URL }}?signature_type=both" \
337+ -H "Authorization: Bearer ${{ secrets.DEFGUARD_SIGNING_API_KEY }}" \
338+ -F "file=@Release" \
339+ -o response.json
346340
347- # cat response.json | jq -r '.files["Release.gpg"].content' | base64 --decode > Release.gpg
348- # cat response.json | jq -r '.files.Release.content' | base64 --decode > InRelease
341+ cat response.json | jq -r '.files["Release.gpg"].content' | base64 --decode > Release.gpg
342+ cat response.json | jq -r '.files.Release.content' | base64 --decode > InRelease
349343
350- # aws s3 cp Release.gpg s3://apt.defguard.net/dists/${DIST}/ --acl public-read
351- # aws s3 cp InRelease s3://apt.defguard.net/dists/${DIST}/ --acl public-read
344+ aws s3 cp Release.gpg s3://apt.defguard.net/dists/${DIST}/ --acl public-read
345+ aws s3 cp InRelease s3://apt.defguard.net/dists/${DIST}/ --acl public-read
352346
353- # done
354- # (aws s3 ls s3://apt.defguard.net/dists/ --recursive; aws s3 ls s3://apt.defguard.net/pool/ --recursive) | awk '{print "<a href=\""$4"\">"$4"</a><br>"}' > index.html
355- # aws s3 cp index.html s3://apt.defguard.net/ --acl public-read
347+ done
348+ (aws s3 ls s3://apt.defguard.net/dists/ --recursive; aws s3 ls s3://apt.defguard.net/pool/ --recursive) | awk '{print "<a href=\""$4"\">"$4"</a><br>"}' > index.html
349+ aws s3 cp index.html s3://apt.defguard.net/ --acl public-read
356350
357351 # update-aur:
358352 # needs:
0 commit comments