2022-05-16 22:23:44 +08:00
|
|
|
# Separate to the main build workflow for access to develop
|
|
|
|
# environment secrets, largely similar to build.yaml.
|
|
|
|
name: Build and Package develop
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ develop ]
|
|
|
|
repository_dispatch:
|
|
|
|
types: [ element-web-notify ]
|
2022-08-05 00:07:22 +08:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}
|
|
|
|
cancel-in-progress: true
|
2022-05-16 22:23:44 +08:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: "Build & Upload source maps to Sentry"
|
2022-06-14 18:30:12 +08:00
|
|
|
# Only respect triggers from our develop branch, ignore that of forks
|
|
|
|
if: github.repository == 'vector-im/element-web'
|
2022-05-16 22:23:44 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
environment: develop
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
cache: 'yarn'
|
|
|
|
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: "./scripts/layered.sh"
|
|
|
|
|
|
|
|
- name: Build, Package & Upload sourcemaps
|
|
|
|
run: "./scripts/ci_package.sh"
|
|
|
|
env:
|
|
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
|
|
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
|
|
|
SENTRY_URL: ${{ secrets.SENTRY_URL }}
|
2022-08-02 19:08:17 +08:00
|
|
|
SENTRY_ORG: element
|
|
|
|
SENTRY_PROJECT: riot-web
|
2022-07-12 18:50:47 +08:00
|
|
|
|
2022-09-05 16:40:37 +08:00
|
|
|
- run: mv dist/element-*.tar.gz dist/develop.tar.gz
|
|
|
|
|
|
|
|
# We keep the latest develop.tar.gz as the artifact uploaded later expires after 24 and requires auth to download
|
|
|
|
# Element Desktop's fetch script uses this tarball to fetch latest develop to build Nightlies.
|
|
|
|
- name: Deploy develop.tar.gz to Github Pages
|
|
|
|
uses: JamesIves/github-pages-deploy-action@v4
|
|
|
|
with:
|
|
|
|
folder: dist
|
2022-09-07 00:21:12 +08:00
|
|
|
single-commit: true
|
2022-09-05 16:40:37 +08:00
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: webapp
|
|
|
|
path: dist/develop.tar.gz
|
|
|
|
retention-days: 1
|
|
|
|
|
2022-08-02 19:38:05 +08:00
|
|
|
- name: Wait for other steps to succeed
|
2022-09-10 11:03:46 +08:00
|
|
|
uses: lewagon/wait-on-check-action@v1.1.2
|
2022-07-13 16:57:51 +08:00
|
|
|
with:
|
|
|
|
ref: ${{ github.ref }}
|
2022-08-02 19:38:05 +08:00
|
|
|
running-workflow-name: 'Build & Upload source maps to Sentry'
|
2022-07-13 16:57:51 +08:00
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
wait-interval: 10
|
2022-08-05 00:36:13 +08:00
|
|
|
check-regexp: ^((?!SonarQube|issues|board).)*$
|