From 46d241ac3e31e5c305ecf63de7bea102e3ddf97e Mon Sep 17 00:00:00 2001 From: Anton Alexandrenok Date: Thu, 31 Dec 2020 12:31:37 +0300 Subject: [PATCH] chore(ci): Set up GitHub actions --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..66d86f6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: [push, pull_request] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 10 + - name: yarn install + # "--frozen-lockfile" doesn't work, see https://github.com/yarnpkg/yarn/issues/5840 + run: | + CKSUM_BEFORE=$(cksum yarn.lock) + yarn install + CKSUM_AFTER=$(cksum yarn.lock) + if [[ $CKSUM_BEFORE != $CKSUM_AFTER ]]; then + echo "yarn.lock is outdated" + exit 1 + fi + - run: yarn lint + - run: yarn test --ci --runInBand + env: + NODE_ENV: test + - run: yarn dist + env: + NODE_ENV: production + - uses: actions/upload-artifact@v2 + with: + name: ${{ format('spyke-conventional-changelog-preset_{0}-{1}', github.run_number, github.sha) }} + path: "dist/*"