Skip to content
Closed
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
38 changes: 37 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ on:

# Only run for pull requests if relevant files were changed
pull_request:
branches: [main]
branches:
- main
- 'release/**'
paths:
- Dockerfile
- docker-bake.hcl
Expand All @@ -31,10 +33,37 @@ env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index

jobs:
compute-version:
name: Compute version using git describe
runs-on: ubuntu-24.04
outputs:
describe: ${{ steps.git.outputs.describe }}
timestamp: ${{ steps.git.outputs.timestamp }}
steps:
- name: Checkout the code
uses: actions/[email protected]
with:
# Need a full clone so that `git describe` reports the right version
fetch-depth: 0

- name: Compute version and timestamp out of git history
id: git
run: |
echo "describe=$(git describe --tags --match 'v*.*.*' --always)" >> $GITHUB_OUTPUT
echo "timestamp=$(git log -1 --format=%ct)" >> $GITHUB_OUTPUT


build-binaries:
name: Build binaries
runs-on: ubuntu-22.04

needs:
- compute-version

env:
VERGEN_GIT_DESCRIBE: ${{ needs.compute-version.outputs.describe }}
SOURCE_DATE_EPOCH: ${{ needs.compute-version.outputs.timestamp }}

permissions:
contents: read

Expand Down Expand Up @@ -136,6 +165,13 @@ jobs:
packages: write
id-token: write

needs:
- compute-version

env:
VERGEN_GIT_DESCRIBE: ${{ needs.compute-version.outputs.describe }}
SOURCE_DATE_EPOCH: ${{ needs.compute-version.outputs.timestamp }}

steps:
- name: Docker meta
id: meta
Expand Down
52 changes: 26 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 28 additions & 28 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = ["crates/*"]
resolver = "2"

# Updated in the CI with a `sed` command
package.version = "0.13.0-rc.1"
package.version = "0.13.0-rc.2"
package.license = "AGPL-3.0-only"
package.authors = ["Element Backend Team"]
package.edition = "2021"
Expand All @@ -27,33 +27,33 @@ broken_intra_doc_links = "deny"
[workspace.dependencies]

# Workspace crates
mas-axum-utils = { path = "./crates/axum-utils/", version = "=0.13.0-rc.1" }
mas-cli = { path = "./crates/cli/", version = "=0.13.0-rc.1" }
mas-config = { path = "./crates/config/", version = "=0.13.0-rc.1" }
mas-data-model = { path = "./crates/data-model/", version = "=0.13.0-rc.1" }
mas-email = { path = "./crates/email/", version = "=0.13.0-rc.1" }
mas-graphql = { path = "./crates/graphql/", version = "=0.13.0-rc.1" }
mas-handlers = { path = "./crates/handlers/", version = "=0.13.0-rc.1" }
mas-http = { path = "./crates/http/", version = "=0.13.0-rc.1" }
mas-i18n = { path = "./crates/i18n/", version = "=0.13.0-rc.1" }
mas-i18n-scan = { path = "./crates/i18n-scan/", version = "=0.13.0-rc.1" }
mas-iana = { path = "./crates/iana/", version = "=0.13.0-rc.1" }
mas-iana-codegen = { path = "./crates/iana-codegen/", version = "=0.13.0-rc.1" }
mas-jose = { path = "./crates/jose/", version = "=0.13.0-rc.1" }
mas-keystore = { path = "./crates/keystore/", version = "=0.13.0-rc.1" }
mas-listener = { path = "./crates/listener/", version = "=0.13.0-rc.1" }
mas-matrix = { path = "./crates/matrix/", version = "=0.13.0-rc.1" }
mas-matrix-synapse = { path = "./crates/matrix-synapse/", version = "=0.13.0-rc.1" }
mas-oidc-client = { path = "./crates/oidc-client/", version = "=0.13.0-rc.1" }
mas-policy = { path = "./crates/policy/", version = "=0.13.0-rc.1" }
mas-router = { path = "./crates/router/", version = "=0.13.0-rc.1" }
mas-spa = { path = "./crates/spa/", version = "=0.13.0-rc.1" }
mas-storage = { path = "./crates/storage/", version = "=0.13.0-rc.1" }
mas-storage-pg = { path = "./crates/storage-pg/", version = "=0.13.0-rc.1" }
mas-tasks = { path = "./crates/tasks/", version = "=0.13.0-rc.1" }
mas-templates = { path = "./crates/templates/", version = "=0.13.0-rc.1" }
mas-tower = { path = "./crates/tower/", version = "=0.13.0-rc.1" }
oauth2-types = { path = "./crates/oauth2-types/", version = "=0.13.0-rc.1" }
mas-axum-utils = { path = "./crates/axum-utils/", version = "=0.13.0-rc.2" }
mas-cli = { path = "./crates/cli/", version = "=0.13.0-rc.2" }
mas-config = { path = "./crates/config/", version = "=0.13.0-rc.2" }
mas-data-model = { path = "./crates/data-model/", version = "=0.13.0-rc.2" }
mas-email = { path = "./crates/email/", version = "=0.13.0-rc.2" }
mas-graphql = { path = "./crates/graphql/", version = "=0.13.0-rc.2" }
mas-handlers = { path = "./crates/handlers/", version = "=0.13.0-rc.2" }
mas-http = { path = "./crates/http/", version = "=0.13.0-rc.2" }
mas-i18n = { path = "./crates/i18n/", version = "=0.13.0-rc.2" }
mas-i18n-scan = { path = "./crates/i18n-scan/", version = "=0.13.0-rc.2" }
mas-iana = { path = "./crates/iana/", version = "=0.13.0-rc.2" }
mas-iana-codegen = { path = "./crates/iana-codegen/", version = "=0.13.0-rc.2" }
mas-jose = { path = "./crates/jose/", version = "=0.13.0-rc.2" }
mas-keystore = { path = "./crates/keystore/", version = "=0.13.0-rc.2" }
mas-listener = { path = "./crates/listener/", version = "=0.13.0-rc.2" }
mas-matrix = { path = "./crates/matrix/", version = "=0.13.0-rc.2" }
mas-matrix-synapse = { path = "./crates/matrix-synapse/", version = "=0.13.0-rc.2" }
mas-oidc-client = { path = "./crates/oidc-client/", version = "=0.13.0-rc.2" }
mas-policy = { path = "./crates/policy/", version = "=0.13.0-rc.2" }
mas-router = { path = "./crates/router/", version = "=0.13.0-rc.2" }
mas-spa = { path = "./crates/spa/", version = "=0.13.0-rc.2" }
mas-storage = { path = "./crates/storage/", version = "=0.13.0-rc.2" }
mas-storage-pg = { path = "./crates/storage-pg/", version = "=0.13.0-rc.2" }
mas-tasks = { path = "./crates/tasks/", version = "=0.13.0-rc.2" }
mas-templates = { path = "./crates/templates/", version = "=0.13.0-rc.2" }
mas-tower = { path = "./crates/tower/", version = "=0.13.0-rc.2" }
oauth2-types = { path = "./crates/oauth2-types/", version = "=0.13.0-rc.2" }

# OpenAPI schema generation and validation
[workspace.dependencies.aide]
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ RUN --network=default \
# Build the rest
COPY ./ /app
ENV SQLX_OFFLINE=true

ARG VERGEN_GIT_DESCRIBE
ENV VERGEN_GIT_DESCRIBE=${VERGEN_GIT_DESCRIBE}

# Network access: cargo auditable needs it
RUN --network=default \
cargo auditable build \
Expand Down
Loading
Loading