From 0e225038602b26134583f50e7e802fdac785926c Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 27 Apr 2022 23:07:06 +0100 Subject: [PATCH] Reusable workflows don't help us here --- .github/workflows/build.yaml | 24 ++---------------------- .github/workflows/build_develop.yaml | 28 ++++++++++++++++++++++------ 2 files changed, 24 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b9741f43a6..19f23ca1bb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,21 +3,7 @@ on: pull_request: { } push: branches: [ master ] - workflow_call: - inputs: - SENTRY_ORG: - required: true - type: string - SENTRY_PROJECT: - required: true - type: string - secrets: - SENTRY_AUTH_TOKEN: - required: true - SENTRY_DSN: - required: true - SENTRY_URL: - required: true +# develop pushes and repository_dispatch handled in build_develop.yaml env: # These must be set for fetchdep.sh to get the right branch REPOSITORY: ${{ github.repository }} @@ -38,16 +24,10 @@ jobs: - name: Build & Package run: "./scripts/ci_package.sh" - env: - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_DSN: ${{ secrets.SENTRY_DSN }} - SENTRY_URL: ${{ secrets.SENTRY_URL }} - SENTRY_ORG: ${{ inputs.SENTRY_ORG }} - SENTRY_PROJECT: ${{ inputs.SENTRY_PROJECT }} - name: Upload Artifact uses: actions/upload-artifact@v2 with: name: previewbuild path: dist/*.tar.gz - retention-days: ${{ github.ref == 'develop' && 1 || 28 }} + retention-days: 28 diff --git a/.github/workflows/build_develop.yaml b/.github/workflows/build_develop.yaml index f194245ce4..d223d60e5b 100644 --- a/.github/workflows/build_develop.yaml +++ b/.github/workflows/build_develop.yaml @@ -1,5 +1,5 @@ -# Separate to the main build workflow for access to the develop -# secrets environment, reuses the build workflow for heavy lifting. +# Separate to the main build workflow for access to develop +# environment secrets, largely similar to build.yaml. name: Build and upload sourcemaps to Sentry on: push: @@ -8,14 +8,30 @@ on: types: [ element-web-notify ] jobs: build: - name: "Build" - environment: develop + name: "Build Develop" runs-on: ubuntu-latest steps: - - uses: ./.github/workflows/build.yaml - secrets: + - 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 }} SENTRY_ORG: sentry SENTRY_PROJECT: riot-web + + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + name: previewbuild + path: dist/*.tar.gz + retention-days: 1