Skip to content

chore: use relative path to link local packages #2001

chore: use relative path to link local packages

chore: use relative path to link local packages #2001

Workflow file for this run

name: Release
on:
push:
branches: [main]
tags:
- "v*"
pull_request:
jobs:
continuous-integration:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- name: Use Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b #v4.0.3
with:
node-version-file: .nvmrc
cache: "yarn"
registry-url: "https://npm.pkg.github.com/"
scope: "@frameless"
- run: yarn install --frozen-lockfile
- name: Make the root envfile
uses: SpicyPizza/create-envfile@ace6d4f5d7802b600276c23ca417e669f1a06f6f #v2.0.3
with:
envkey_DEBUG: false
envkey_HOST: ${{ secrets.HOST }}
envkey_PORT: ${{ secrets.PORT }}
envkey_DATABASE_HOST: ${{ secrets.DATABASE_HOST }}
envkey_APP_KEYS: ${{ secrets.APP_KEYS }}
envkey_API_TOKEN_SALT: ${{ secrets.API_TOKEN_SALT }}
envkey_ADMIN_JWT_SECRET: ${{ secrets.ADMIN_JWT_SECRET }}
envkey_JWT_SECRET: ${{ secrets.JWT_SECRET }}
envkey_MATOMO_HOST: ${{ secrets.MATOMO_HOST }}
envkey_MATOMO_SITE_ID: ${{ secrets.MATOMO_SITE_ID }}
envkey_PREVIEW_SECRET_TOKEN: ${{ secrets.PREVIEW_SECRET_TOKEN }}
envkey_TRANSFER_TOKEN_SALT: ${{ secrets.TRANSFER_TOKEN_SALT }}
envkey_DATABASE_CLIENT: ${{ secrets.DATABASE_CLIENT }}
envkey_DATABASE_PORT: ${{ secrets.DATABASE_PORT }}
envkey_STRAPI_PRIVATE_URL: ${{ secrets.STRAPI_PRIVATE_URL }}
envkey_DATABASE_NAME: ${{ secrets.DATABASE_NAME }}
envkey_DATABASE_USERNAME: ${{ secrets.DATABASE_USERNAME }}
envkey_DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
envkey_DATABASE_SSL: ${{ secrets.DATABASE_SSL }}
envkey_NODE_ENV: ${{ secrets.NODE_ENV }}
envkey_OPEN_FORMS_API_TOKEN: ${{ secrets.OPEN_FORMS_API_TOKEN }}
envkey_OPEN_FORMS_API_URL: ${{ secrets.OPEN_FORMS_API_URL }}
envkey_PANDOSEARCH_API_URL: ${{ secrets.PANDOSEARCH_API_URL }}
envkey_FRONTEND_PUBLIC_URL: ${{ secrets.FRONTEND_PUBLIC_URL }}
envkey_PGADMIN_DEFAULT_EMAIL: ${{ secrets.PGADMIN_DEFAULT_EMAIL }}
envkey_PGADMIN_DEFAULT_PASSWORD: ${{ secrets.PGADMIN_DEFAULT_PASSWORD }}
envkey_STRAPI_PUBLIC_URL: ${{ secrets.STRAPI_PUBLIC_URL }}
envkey_STRAPI_ENV_LABEL: ${{ secrets.STRAPI_ENV_LABEL }}
envkey_OGONE_PAYMENT_SERVICE_URL: ${{ secrets.OGONE_PAYMENT_SERVICE_URL }}
file_name: .prod.env
fail_on_empty: false
- name: Test
run: yarn run test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Build
run: yarn run build
- name: Lint
env:
NODE_OPTIONS: "--max_old_space_size=4096"
run: yarn run lint
- name: Upload artifact for GitHub Pages
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: apps/strapi.frameless.io/build/
continuous-deployment:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- name: Check Free Disk Space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be #v1.3.1
with:
swap-storage: false
- name: Docker meta
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 #v5.5.1
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value={{sha}},enable=${{ github.ref_type != 'tag' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf #v3.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db #v3.6.1
- name: Login to GitHub Container Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 #v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_CLASSIC_TOKEN }}
- name: Build and push
uses: docker/build-push-action@5176d81f87c23d6fc96624dfdbcd9f3830bbe445 #v6.5.0
with:
context: .
file: Dockerfile.prod
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
publish-npm:
runs-on: ubuntu-latest
needs: continuous-integration
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- name: Use Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b #v4.0.3
with:
node-version-file: .nvmrc
cache: "yarn"
registry-url: "https://npm.pkg.github.com/"
scope: "@frameless"
- name: Install
run: yarn install --frozen-lockfile
- name: Build
run: yarn run build
- name: Publish to GitHub repository
if: github.ref == 'refs/heads/main'
uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 # v1.4.7
id: changeset
env:
GIT_AUTHOR_EMAIL: "devops@frameless.io"
GIT_AUTHOR_NAME: "Frameless DevOps"
GIT_COMMITTER_EMAIL: "devops@frameless.io"
GIT_COMMITTER_NAME: "Frameless DevOps"
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.GH_CLASSIC_TOKEN }}
with:
commit: "docs(release): strapi packages"
setupGitUser: false
title: "docs(release): strapi packages"
publish: "yarn run publish"
publish-strapi-docs-website:
runs-on: ubuntu-latest
needs: continuous-integration
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deploy-pages.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deploy-pages
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5