diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dd0a1d9..2d963b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -178,20 +178,6 @@ jobs: asset_name: defguard-proxy-${{ env.VERSION }}-${{ matrix.target }}.deb asset_content_type: application/octet-stream - - name: Install ruby with deb-s3 - if: matrix.build == 'linux' - run: | - sudo apt-get install -y ruby - gem install deb-s3 - echo "$(ruby -r rubygems -e 'puts Gem.user_dir')/bin" >> $GITHUB_PATH - - - name: Upload DEB to apt repository - if: matrix.build == 'linux' - run: | - COMPONENT=$([[ "${{ github.ref_name }}" == *"-"* ]] && echo "pre-release" || echo "release") # if tag contain "-" assume it's pre-release. - - 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=trixie --component="$COMPONENT" defguard-proxy-${{ env.VERSION }}-${{ matrix.target }}.deb - - name: Build RPM package if: matrix.build == 'linux' uses: bpicode/github-action-fpm@master @@ -209,39 +195,3 @@ jobs: asset_path: defguard-proxy-${{ env.VERSION }}-${{ matrix.target }}.rpm asset_name: defguard-proxy-${{ env.VERSION }}-${{ matrix.target }}.rpm asset_content_type: application/octet-stream - - apt-sign: - needs: - - build-binaries - runs-on: - - self-hosted - - Linux - - X64 - strategy: - fail-fast: false - steps: - - name: Sign APT repository on trixie - run: | - export AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_APT }} - export AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_KEY_APT }} - export AWS_REGION=eu-north-1 - sudo apt update -y - sudo apt install -y awscli curl jq - - for DIST in trixie; do - aws s3 cp s3://apt.defguard.net/dists/${DIST}/Release . - - curl -X POST "${{ secrets.DEFGUARD_SIGNING_URL }}?signature_type=both" \ - -H "Authorization: Bearer ${{ secrets.DEFGUARD_SIGNING_API_KEY }}" \ - -F "file=@Release" \ - -o response.json - - cat response.json | jq -r '.files["Release.gpg"].content' | base64 --decode > Release.gpg - cat response.json | jq -r '.files.Release.content' | base64 --decode > InRelease - - aws s3 cp Release.gpg s3://apt.defguard.net/dists/${DIST}/ --acl public-read - aws s3 cp InRelease s3://apt.defguard.net/dists/${DIST}/ --acl public-read - - done - (aws s3 ls s3://apt.defguard.net/dists/ --recursive; aws s3 ls s3://apt.defguard.net/pool/ --recursive) | awk '{print ""$4"
"}' > index.html - aws s3 cp index.html s3://apt.defguard.net/ --acl public-read