Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package release builds of element-web in package.element.io debs #25198

Merged
merged 3 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/build_debian.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build Debian package
on:
release:
types: [published]
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 }}
steps:
- uses: actions/checkout@v3

- name: Prepare
run: |
mkdir debian/DEBIAN
mv debian/* debian/DEBIAN/
mkdir -p debian/usr/share/element-web/

wget https://github.com/vector-im/element-web/releases/download/$VERSION/element-$VERSION.tar.gz
mv element-* debian/usr/share/element-web
mv debian/usr/share/element-web/config.sample.json debian/usr/share/element-web/config.json
env:
VERSION: ${{ github.ref_name }}

- name: Build deb package
run: |
VERSION=$(cat package.json | jq -r .version)
chmod -R u=rw,go=r debian/usr/share/element-web/
dpkg-deb -Zxz --root-owner-group -VVersion=$VERSION --build debian element-web.deb

# For now just upload the artifact to github
- uses: actions/upload-artifact@v3
with:
name: element-io-archive-keyring
path: element-io-archive-keyring.deb
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
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}

#reprepro:
# needs: build
# name: Run reprepro
# if: inputs.deploy && github.event.release.prerelease == false
# uses: ./.github/workflows/reprepro.yaml
# secrets: inherit
# with:
# incoming: element-web.deb
Comment on lines +43 to +56
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this all commented out? Looks like this need to be changed before we merge it

Copy link
Member Author

@t3chguy t3chguy Aug 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://github.com/vector-im/element-web/pull/25198/files#diff-4c309d9030a15d6a9177d9905cc98389fbe7fb7862dfe1892c97b8d99fcd4d51R36 - there's no way to test this in advance so for now it'll just build the deb on the next full release, if that works successfully then we can start deploying it the release after

1 change: 1 addition & 0 deletions debian/conffiles
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/usr/share/element-web/config.json
12 changes: 12 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Package: element-web
License: Apache-2.0
Vendor: support@element.io
Architecture: all
Maintainer: support@element.io
Recommends: element-io-archive-keyring
Section: web
Priority: optional
Homepage: https://element.io/
Version: ${Version}
Description:
A feature-rich client for Matrix.org