name: Linux on: push: branches: - master tags: - "v*.*.*" paths-ignore: - 'catalog/**' - 'docs/**' pull_request: branches: - master paths-ignore: - 'catalog/**' - 'docs/**' jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 with: fetch-depth: 1 submodules: false - name: Install Snapcraft uses: samuelmeuli/action-snapcraft@v1 with: snapcraft_token: ${{ secrets.SNAP_TOKEN }} - name: Set up Node.js uses: actions/setup-node@v1 with: node-version: 12.x - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - name: Cache yarn cache uses: actions/cache@v2 id: cache-yarn-cache with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - name: Cache node_modules id: cache-node-modules uses: actions/cache@v1 with: path: node_modules key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-${{ matrix.node-version }}-nodemodules- - run: yarn if: | steps.cache-yarn-cache.outputs.cache-hit != 'true' || steps.cache-node-modules.outputs.cache-hit != 'true' - run: yarn lint - name: Get tag name run: echo ::set-env name=CI_BUILD_TAG::${GITHUB_REF/refs\/tags\//} if: startsWith(github.ref, 'refs/tags/') - run: yarn dist env: CI: true CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} REACT_APP_LICENSE_SECRET: ${{ secrets.REACT_APP_LICENSE_SECRET }}