diff --git a/.github/workflows/auto-release-dev.yml b/.github/workflows/auto-release-dev.yml deleted file mode 100644 index 699aa9d4f..000000000 --- a/.github/workflows/auto-release-dev.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Auto-release @dev - -on: - push: - branches: - - master - -jobs: - release: - name: Auto-release @dev - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@master - with: - # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits - fetch-depth: 0 - - - name: Setup node - uses: actions/setup-node@master - with: - node-version: 12.x - registry-url: https://registry.npmjs.org - - - name: Install dependencies - run: yarn - - - name: Prepare release - run: yarn prerelease - - - name: Release to @dev channel - run: | - yarn changeset version --snapshot - yarn changeset publish --tag dev - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 233ff7256..db4b172f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Test +name: Continuous Integration on: - push @@ -8,10 +8,26 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 + - name: Checkout repo + uses: actions/checkout@v2 + - name: Setup node + uses: actions/setup-node@v2 with: node-version: 12 - - run: yarn && yarn build:rollup && yarn test && yarn lint + - name: Run tests + run: yarn && yarn build:rollup && yarn test && yarn lint + env: + CI: true + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v2 + - name: Setup node + uses: actions/setup-node@v2 + with: + node-version: 12 + - name: Run linters + run: yarn && yarn lint env: CI: true diff --git a/.github/workflows/rebase.yml b/.github/workflows/comment.yml similarity index 94% rename from .github/workflows/rebase.yml rename to .github/workflows/comment.yml index 2b6d1c638..ed2e5acb6 100644 --- a/.github/workflows/rebase.yml +++ b/.github/workflows/comment.yml @@ -1,5 +1,5 @@ # https://github.com/marketplace/actions/automatic-rebase (https://github.com/cirrus-actions/rebase) -name: Rebase +name: Comment Automation on: issue_comment: diff --git a/.github/workflows/create-release-pull-request.yml b/.github/workflows/create-release-pull-request.yml deleted file mode 100644 index 7a83c5d04..000000000 --- a/.github/workflows/create-release-pull-request.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Create release PR - -on: - push: - branches: - - master - -jobs: - release: - name: Create release PR - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@master - with: - # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits - fetch-depth: 0 - - - name: Setup node - uses: actions/setup-node@master - with: - node-version: 12.x - registry-url: https://registry.npmjs.org - - - name: Install dependencies - run: yarn - - - name: Prepare release - run: yarn prerelease - - # https://github.com/changesets/action - - name: Create release pull request - uses: changesets/action@master - with: - publish: yarn changeset publish - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..4764ed99b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,67 @@ +name: Release Automation + +on: + push: + branches: + - master + +jobs: + latest: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@master + with: + # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits + fetch-depth: 0 + + - name: Setup node + uses: actions/setup-node@master + with: + node-version: 12.x + registry-url: https://registry.npmjs.org + + - name: Install dependencies + run: yarn + + - name: Prepare release + run: yarn prerelease + + # https://github.com/changesets/action + - name: Create release pull request + uses: changesets/action@master + with: + publish: yarn changeset publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + dev: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@master + with: + # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits + fetch-depth: 0 + + - name: Setup node + uses: actions/setup-node@master + with: + node-version: 12.x + registry-url: https://registry.npmjs.org + + - name: Install dependencies + run: yarn + + - name: Prepare release + run: yarn prerelease + + - name: Release to @dev channel + run: | + yarn changeset version --snapshot + yarn changeset publish --tag dev + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}