From 3a8bde30b87b12db59dcb3c3ec54ead3c1619acb Mon Sep 17 00:00:00 2001 From: Taso Date: Thu, 8 Jul 2021 15:35:44 -0400 Subject: [PATCH] ci(release/build): add initial build and release ci --- .github/ISSUE_TEMPLATE/bug_report.md | 35 ++++++++++++++++++++++++++++ .github/dependabot.yml | 7 ++++++ .github/workflows/ci.yml | 32 +++++++++++++++++++++++++ .github/workflows/release.yml | 30 ++++++++++++++++++++++++ 4 files changed, 104 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..4afbbb9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,35 @@ +--- +name: Bug Report +about: Create a bug report to help solve an issue +title: 'Bug: TITLE' +labels: New Issue +assignees: '' +--- + +**Describe the issue** + +A clear and concise description of what the bug is. + +**Expected behavior** + +A clear and concise description of what you expected to happen. + +**To Reproduce** + +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + + +**Media** + +If applicable, add a screenshot or a video to help explain your problem. + +**Needed information (please complete the following information):** +- **Client Version:**: [e.g. Canary or Release] +- **Template Version**: [e.g. 3486] Don't know?~~Check the version in your package.json~~ + +**Additional context** +Add any other context about the issue here. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..184e0e2 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: web + open-pull-requests-limit: 5 + schedule: + interval: daily \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ebe4371 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: Main CI +on: [push, pull_request] +jobs: + build: + name: Build Test + runs-on: ubuntu-latest + defaults: + run: + working-directory: web + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup node environment + uses: actions/setup-node@v2 + with: + node-version: 14.x + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn config get cacheFolder)" + - uses: actions/cache@v2 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: Install deps + run: yarn --frozen-lockfile + - name: Try build + run: yarn build + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8647fd7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Tagged Release +on: + push: + tags: + - "v*" +jobs: + create-tagged-release: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: ${{ github.ref }} + - name: Get tag + run: echo ::set-output name=VERSION_TAG::${GITHUB_REF/refs\/tags\//} + id: get_tag + - name: 'Setup Node.js' + uses: 'actions/setup-node@v1' + with: + node-version: 14.x + - name: Create release + uses: marvinpinto/action-automatic-releases@latest + with: + title: React/Lua Boilerplate - ${{ steps.get_tag.outputs.VERSION_TAG }} + repo_token: ${{ secrets.GITHUB_TOKEN }} + prerelease: false + id: auto_release + \ No newline at end of file