From 03a880d5a23125310e1d0828bb4390b9891d587a Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 9 Jul 2024 17:35:07 -0400 Subject: [PATCH] Clean up unused workflows We continuously deploy to https://compound.element.io using Cloudflare Pages, so we don't need to deploy to GitHub Pages as well. However, the workflow that did that was still useful for verifying that this actually builds, so I've kept that part. Also, we don't release anything here to NPM. --- .github/workflows/automation.yaml | 19 ++++++++++ .github/workflows/deploy.yml | 33 ----------------- .github/workflows/npm-release.yml | 59 ------------------------------- 3 files changed, 19 insertions(+), 92 deletions(-) create mode 100644 .github/workflows/automation.yaml delete mode 100644 .github/workflows/deploy.yml delete mode 100644 .github/workflows/npm-release.yml diff --git a/.github/workflows/automation.yaml b/.github/workflows/automation.yaml new file mode 100644 index 0000000..99cb3e8 --- /dev/null +++ b/.github/workflows/automation.yaml @@ -0,0 +1,19 @@ +name: Automation +on: + pull_request: {} + push: + branches: [main] +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 + - name: Set up cache + uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 + with: + cache: yarn + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Build + run: yarn run build-storybook diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 5cb22af..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: GitHub Pages - -on: - push: - branches: - - main - pull_request: - -jobs: - deploy: - runs-on: ubuntu-22.04 - permissions: - contents: write - concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - steps: - - uses: actions/checkout@v3 - with: - submodules: true - fetch-depth: 0 - - - name: Build - run: yarn && yarn run build-storybook - - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - # If you're changing the branch from main, - # also change the `main` in `refs/heads/main` - # below accordingly. - if: ${{ github.ref == 'refs/heads/main' }} - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./storybook-static \ No newline at end of file diff --git a/.github/workflows/npm-release.yml b/.github/workflows/npm-release.yml deleted file mode 100644 index a22c032..0000000 --- a/.github/workflows/npm-release.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Release npm package -on: - workflow_dispatch: - inputs: - version-bump: - description: The scale of the version bump required for semver compatibility - required: true - default: patch - type: choice - options: - - patch - - minor - - major -concurrency: release -jobs: - release: - name: "Release & Publish" - runs-on: ubuntu-latest - defaults: - run: - working-directory: ./app - steps: - - name: 🧮 Checkout code - uses: actions/checkout@v3 - with: - token: ${{ secrets.ELEMENT_BOT_TOKEN }} - - - name: 🔧 Set up node environment - uses: actions/setup-node@v3 - with: - cache: "yarn" - - - name: 🛠️ Setup - run: yarn install --pure-lockfile - - - name: 👊 Bump version - run: | - yarn version --no-git-tag-version --${{ github.event.inputs.version-bump }} - git config --global user.name 'ElementRobot' - git config --global user.email 'releases@riot.im' - git commit -am "${{ github.event.inputs.version-bump }} version bump" - git push - - name: 🚀 Publish to npm - id: npm-publish - uses: JS-DevTools/npm-publish@v1 - with: - token: ${{ secrets.NPM_TOKEN }} - access: public - - - name: 🧬 Create release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: v${{ steps.npm-publish.outputs.version }} - release_name: Release ${{ steps.npm-publish.outputs.version }} - body: ${{ steps.npm-publish.outputs.version }} Release - draft: false - prerelease: false