From ce6a90f2133d967545b879c2dd39973a90e75d97 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Sun, 22 Jan 2023 14:23:33 +0100 Subject: [PATCH 1/4] build(ci): Add "Prepare Release" GH Action --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..15eea42568 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Prepare Release +on: + workflow_dispatch: + inputs: + version: + description: Version to release + required: true + force: + description: Force a release even when there are release-blockers (optional) + required: false + merge_target: + description: Target branch to merge into. Uses the default branch as a fallback (optional) + required: false +jobs: + release: + runs-on: ubuntu-latest + name: "Release a new version" + steps: + - uses: actions/checkout@v3 + with: + token: ${{ secrets.GH_RELEASE_PAT }} + fetch-depth: 0 + - name: Prepare release + uses: getsentry/action-prepare-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }} + with: + version: ${{ github.event.inputs.version }} + force: ${{ github.event.inputs.force }} + merge_target: ${{ github.event.inputs.merge_target }} From fb7f98a0e14638b6979d84e19b08746c37160bc2 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Sun, 22 Jan 2023 14:31:20 +0100 Subject: [PATCH 2/4] build(ci): Add Upload Artifacts job --- .github/workflows/ci-cd.yml | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 128b0da4eb..b41e321df4 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -5,7 +5,7 @@ on: [pull_request] concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: - release: + job_test: name: Tests runs-on: ubuntu-latest steps: @@ -26,5 +26,31 @@ jobs: - name: Run tests # Skip this for now, as it somehow always fails - if: 1 == 2 - run: xvfb-run --server-args="-screen 0 1920x1080x24" yarn test \ No newline at end of file + if: 1 == 2 + run: xvfb-run --server-args="-screen 0 1920x1080x24" yarn test + + job_artifacts: + needs: job_test + name: Upload Artifacts + runs-on: ubuntu-latest + # Build artifacts are only needed for releasing workflow. + if: startsWith(github.ref, 'refs/heads/release/') + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - name: Set up Node + uses: volta-cli/action@v3 + + - name: Install Dependencies + run: yarn --frozen-lockfile + + - name: Build Tarballs + run: yarn build:tarball + + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: ${{ github.sha }} + path: | + ${{ github.workspace }}/packages/**/*.tgz From ec3485498253654d67fbb9a8b711d3cd74b05e2a Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Mon, 23 Jan 2023 14:37:04 -0500 Subject: [PATCH 3/4] run action on push for release and master --- .github/workflows/ci-cd.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index b41e321df4..081895b70e 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -1,6 +1,11 @@ -name: Tests - -on: [pull_request] +name: Build & Tests + +on: + push: + branches: + - master + - release/** + pull_request: concurrency: ${{ github.workflow }}-${{ github.ref }} From 4b63986a2f7fe5aef6d8eb926267079e165be166 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Mon, 23 Jan 2023 15:05:58 -0500 Subject: [PATCH 4/4] add default branch name --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 15eea42568..e6335c507e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,12 +9,12 @@ on: description: Force a release even when there are release-blockers (optional) required: false merge_target: - description: Target branch to merge into. Uses the default branch as a fallback (optional) + description: Target branch to merge into. Uses the default branch, sentry-v1, as a fallback (optional) required: false jobs: release: runs-on: ubuntu-latest - name: "Release a new version" + name: 'Release a new version' steps: - uses: actions/checkout@v3 with: