From 02e4fdb5afd8577bc5d1dbe264c041d170db1f7b Mon Sep 17 00:00:00 2001 From: Mumtahin Farabi Date: Wed, 3 Jul 2024 18:30:37 -0400 Subject: [PATCH] ci: Add GitHub Actions file --- .github/workflows/release.yml | 76 +++++++++++++++++++++++++++++++++++ 1 file changed, 76 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 0000000..171fb87 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,76 @@ +name: Release + +on: + push: + branches: '*' + pull_request: + branches: '*' + +jobs: + release: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20] + + steps: + - name: ๐Ÿ›Ž๏ธ Checkout Code + uses: actions/checkout@v4 + with: + fetch-depth: 0 # All history for branches and tags + + - name: ๐Ÿ“ฆ Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: ๐Ÿ› ๏ธ Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: '${{ matrix.node-version }}' + cache: pnpm + + - name: ๐Ÿ“‚ Install Dependencies + run: pnpm i + + # - name: ๐Ÿง Check Code Quality + # run: pnpm lint + + # - name: ๐ŸŽญ Install Playwright + # run: pnpm i playwright http-server wait-on; npx playwright install --with-deps + + # - name: ๐Ÿ“” Build Storybook + # run: pnpm build-storybook --quiet + + # - name: ๐Ÿงช Serve Storybook and run tests + # run: | + # pnpx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ + # "pnpm exec http-server storybook-static --port 6006 --silent" \ + # "pnpm exec wait-on tcp:6006 && pnpm test-storybook" + + # - name: ๐Ÿ”ฌ Run Unit Tests + # run: pnpm jest ... + + # - name: ๐Ÿ” Run Integration Tests + # run: pnpm jest ... + + # - name: โŒš ๐Ÿ’€ Run E2E Tests + # run: pnpx playwright test + + # - name: ๐Ÿ‘€ Run Visual Tests + # env: + # CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + # run: pnpm run chromatic + + - name: ๐Ÿ—๏ธ Build Project + # env: + # SANITY_API_READ_TOKEN: ${{ secrets.SANITY_API_READ_TOKEN }} + run: pnpm build + + # - name: ๐Ÿค– Run Semantic Release + # env: + # GH_TOKEN: ${{ secrets.GH_TOKEN }} + # run: pnpm exec semantic-release + + - name: ๐Ÿ’ฐ Profit + run: echo ๐Ÿž