Iterate build_debian.yaml workflow (#26434)
This commit is contained in:
parent
6fa6c6517c
commit
16ec8edd58
1 changed files with 20 additions and 8 deletions
28
.github/workflows/build_debian.yaml
vendored
28
.github/workflows/build_debian.yaml
vendored
|
@ -6,26 +6,37 @@ concurrency: ${{ github.workflow }}
|
|||
jobs:
|
||||
build:
|
||||
name: Build package
|
||||
if: github.event.release.prerelease == false
|
||||
environment: packages.element.io
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
R2_INCOMING_BUCKET: ${{ vars.R2_INCOMING_BUCKET }}
|
||||
R2_URL: ${{ vars.CF_R2_S3_API }}
|
||||
VERSION: ${{ github.ref_name }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Download package
|
||||
run: |
|
||||
wget "https://github.com/vector-im/element-web/releases/download/$VERSION/element-$VERSION.tar.gz"
|
||||
wget "https://github.com/vector-im/element-web/releases/download/$VERSION/element-$VERSION.tar.gz.asc"
|
||||
|
||||
- name: Check GPG signature
|
||||
run: |
|
||||
wget "https://packages.element.io/element-release-key.gpg"
|
||||
gpg --import element-release-key.gpg
|
||||
gpg --fingerprint "$FINGERPRINT"
|
||||
gpg --verify "element-$VERSION.tar.gz.asc" "element-$VERSION.tar.gz"
|
||||
env:
|
||||
FINGERPRINT: ${{ vars.GPG_FINGERPRINT }}
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
mkdir -p /tmp/element-web-debian/DEBIAN
|
||||
cp -R debian/ /tmp/element-web-debian/DEBIAN/
|
||||
mkdir -p /tmp/element-web-debian/usr/share/element-web/
|
||||
|
||||
wget https://github.com/vector-im/element-web/releases/download/$VERSION/element-$VERSION.tar.gz
|
||||
mv element-* /tmp/element-web-debian/usr/share/element-web
|
||||
mv debian/usr/share/element-web/config.sample.json /tmp/element-web-debian/usr/share/element-web/config.json
|
||||
env:
|
||||
VERSION: ${{ github.ref_name }}
|
||||
tar -xf "element-$VERSION.tar.gz" -C /tmp/element-web/debian/usr/share/element-web --strip-components=1
|
||||
cp config.sample.json /tmp/element-web-debian/usr/share/element-web/config.json
|
||||
|
||||
- name: Build deb package
|
||||
run: |
|
||||
|
@ -41,7 +52,8 @@ jobs:
|
|||
retention-days: 14
|
||||
|
||||
#- name: Upload incoming deb
|
||||
# run: aws s3 cp element-io-archive-keyring.deb "s3://$R2_INCOMING_BUCKET" --endpoint-url "$R2_URL" --region auto
|
||||
# if: github.event.release.prerelease == false
|
||||
# run: aws s3 cp element-web.deb "s3://$R2_INCOMING_BUCKET" --endpoint-url "$R2_URL" --region auto
|
||||
# env:
|
||||
# AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
|
||||
# AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}
|
||||
|
@ -49,7 +61,7 @@ jobs:
|
|||
#reprepro:
|
||||
# needs: build
|
||||
# name: Run reprepro
|
||||
# if: inputs.deploy && github.event.release.prerelease == false
|
||||
# if: github.event.release.prerelease == false
|
||||
# uses: ./.github/workflows/reprepro.yaml
|
||||
# secrets: inherit
|
||||
# with:
|
||||
|
|
Loading…
Reference in a new issue