From f2ef9221d2f247f9a4c6ddc019c1abe6c0267fbb Mon Sep 17 00:00:00 2001 From: Basile Spaenlehauer Date: Mon, 15 Jan 2024 09:07:57 +0100 Subject: [PATCH] fix(build): add build workflow (#459) --- .github/workflows/build.yml | 40 ++++++++++++++++++++ .github/workflows/update-staging-version.yml | 36 ------------------ 2 files changed, 40 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/update-staging-version.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..b1cad16f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,40 @@ +name: Build + +# Control when the action will run +on: + # Triggers the workflow on push events + push: + +concurrency: + group: build-${{ github.ref }} + cancel-in-progress: false + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + # Check-out repository under $GITHUB_WORKSPACE, so the job can access it + - name: Check out code + uses: actions/checkout@v4 + + - name: Yarn Install and Cache + uses: graasp/graasp-deploy/.github/actions/yarn-install-and-cache@v1 + with: + cypress: false + + # type check + - name: Type-check code + run: tsc --noEmit + + - name: Build App + run: yarn build + shell: bash + env: + VITE_PORT: 3112 + VITE_VERSION: build-ci + VITE_GRAASP_DOMAIN: localhost + VITE_GRAASP_API_HOST: http://localhost:3636 + VITE_GRAASP_AUTH_HOST: http://localhost:3001 + VITE_GRAASP_BUILDER_HOST: http://localhost:3111 + VITE_SHOW_NOTIFICATIONS: true diff --git a/.github/workflows/update-staging-version.yml b/.github/workflows/update-staging-version.yml deleted file mode 100644 index 7c6308a1..00000000 --- a/.github/workflows/update-staging-version.yml +++ /dev/null @@ -1,36 +0,0 @@ -# This workflow triggers a new workflow inside the graasp-deploy repository. It passes a json -# with the repository name and the latest tag pushed from the caller repository. -name: Push new tag to graasp-deploy repository - -# Controls when the action will run -on: - # Allow the workflow to be manually triggered - workflow_dispatch: - # Inputs the workflow accepts. - inputs: - release-type: - # Description to be shown in the UI instead of 'stack' - description: 'Select a release type' - # Default value if no value is explicitly provided - # Input does not have to be provided for the workflow to run - type: choice - options: - - first - - patch - - minor - - major - default: patch - required: true - -# This workflow is made up of one job that calls the reusable workflow in graasp-deploy -jobs: - graasp-deploy-update-staging-version-workflow: - # Replace with repository name - name: Graasp Player - # Replace 'main' with the hash of a commit, so it points to an specific version of the reusable workflow that is used - # Reference reusable workflow file. Using the commit SHA is the safest for stability and security - uses: graasp/graasp-deploy/.github/workflows/update-staging-version.yml@v1 - with: - release-type: ${{ inputs.release-type }} - secrets: - token: ${{ secrets.REPO_ACCESS_TOKEN }}