From ced1129de1006f4d34e150df7403d34c980c3e44 Mon Sep 17 00:00:00 2001 From: sbstjn Date: Thu, 17 Dec 2020 11:26:06 +0100 Subject: [PATCH] feat: add github action for semver --- .github/workflows/integration.yml | 62 +++++++++++++++++++++++++++++++ .releaserc | 3 ++ 2 files changed, 65 insertions(+) create mode 100644 .github/workflows/integration.yml create mode 100644 .releaserc diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 00000000..8c2cb84c --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,62 @@ +name: Integration + +on: + push: + branches: ['*', '*/*', '**', '!main'] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: actions/cache@v2 + with: + path: '**/node_modules' + key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} + + - uses: actions/setup-node@v2-beta + with: + node-version: '12' + + - run: yarn + + - run: yarn build + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: actions/cache@v2 + with: + path: '**/node_modules' + key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} + + - uses: actions/setup-node@v2-beta + with: + node-version: '12' + + - run: yarn + + - run: yarn test + version: + runs-on: ubuntu-latest + needs: + - build + - test + steps: + - uses: actions/checkout@v2 + + - name: Semantic Release + uses: cycjimmy/semantic-release-action@v2 + timeout-minutes: 2 + id: semantic + with: + extra_plugins: | + @semantic-release/git + @semantic-release/changelog + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.releaserc b/.releaserc new file mode 100644 index 00000000..dad3bd9e --- /dev/null +++ b/.releaserc @@ -0,0 +1,3 @@ +{ + "branches": ["main", "next"] +} \ No newline at end of file