diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index af97a4d..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,7 +0,0 @@ -version: 2 - -updates: - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "weekly" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e41fb00 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Build tests + +on: + push: + branches: [develop] + pull_request: + branches: [main, develop] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3.0.0 + + - name: Use Node.js + uses: actions/setup-node@v3.1.1 + with: + node-version: 16.x + + - name: Install packages + run: npm ci + + - name: Build project + run: npm run build diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..0ed0695 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,32 @@ +name: 'Lint tests' + +on: + push: + branches: [develop] + pull_request: + branches: [main, develop] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3.0.0 + + - name: Use Node.js + uses: actions/setup-node@v3.1.1 + with: + node-version: 16.x + + - name: Install packages + run: npm ci + + - name: Next.js linting + run: npm run lint:next + + - name: Prettier linting + run: npm run lint:prettier + + - name: Stylelint linting + run: npm run lint:scss diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a812cf1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: 'Release version' + +on: + push: + branches: [main] + +jobs: + release: + runs-on: ubuntu-latest + if: ${{ github.ref == 'refs/heads/master' }} + needs: [quality] + steps: + - name: Checkout code + uses: actions/checkout@v3.0.0 + + - name: Use Node.js + uses: actions/setup-node@v3.1.1 + with: + node-version: 16.x + + - name: Install packages + run: npm ci + + - name: Release project + run: npm run release + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}