From ef2c98439727286d4bf9f9a419174cac59194c0d Mon Sep 17 00:00:00 2001 From: eps1lon Date: Tue, 23 Nov 2021 10:48:01 +0100 Subject: [PATCH 1/5] format code --- .storybook/preview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.storybook/preview.js b/.storybook/preview.js index 9df15dbc..203766f9 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -6,4 +6,4 @@ export const decorators = [ ), -]; \ No newline at end of file +]; From 19b9f0f99b4f7c3d1b46c82609557b0c523dc918 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Tue, 23 Nov 2021 11:22:29 +0100 Subject: [PATCH 2/5] Create GH Actions workflow based on previous Travis setup --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 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 00000000..ee590586 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + push: + branches: [master, gh-actions] + pull_request: + branches: [master, gh-actions] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + REACT_DIST: [16, 17] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 14 + uses: actions/setup-node@v2 + with: + node-version: 14 + cache: 'npm' + - run: yarn + - run: yarn add react@${{ matrix.REACT_DIST }} react-dom@${{ matrix.REACT_DIST }} + - run: yarn --cwd www + - run: yarn test + - run: npm run build + - run: npm run semantic-release From 5da12c8a6218bc236907293deec98bb26b4aea3b Mon Sep 17 00:00:00 2001 From: eps1lon Date: Tue, 23 Nov 2021 11:42:16 +0100 Subject: [PATCH 3/5] Only from master Was just temporarily enable for other branches for testing --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee590586..a72cc9a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [master, gh-actions] + branches: [master] pull_request: - branches: [master, gh-actions] + branches: [master] jobs: build: From aef59fb81c3d3989afbb817d71c0e338279c345e Mon Sep 17 00:00:00 2001 From: eps1lon Date: Tue, 23 Nov 2021 11:42:43 +0100 Subject: [PATCH 4/5] Remove obsolete Travis config --- .travis.yml | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 72a0e183..00000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -sudo: false -language: node_js -node_js: - - 14 -env: - - REACT_DIST=16 - - REACT_DIST=17 -cache: yarn -install: - - yarn - - yarn add react@$REACT_DIST react-dom@$REACT_DIST - - yarn --cwd www -script: - - yarn test - -after_success: - - npm run build - - npm run semantic-release -branches: - only: - - master From dec6a83dab43bf97b7b64afc5ada666ea23a48dd Mon Sep 17 00:00:00 2001 From: eps1lon Date: Thu, 13 Jan 2022 18:36:54 +0100 Subject: [PATCH 5/5] Base semantic-release action off of dom-testing-library https://github.com/testing-library/dom-testing-library/blob/74c63b7be5c7d628e3a415396bc6f3d83a90c28e/.github/workflows/validate.yml#L57-L99 --- .github/workflows/ci.yml | 47 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a72cc9a0..5500652c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: branches: [master] jobs: - build: + test: runs-on: ubuntu-latest strategy: @@ -25,5 +25,46 @@ jobs: - run: yarn add react@${{ matrix.REACT_DIST }} react-dom@${{ matrix.REACT_DIST }} - run: yarn --cwd www - run: yarn test - - run: npm run build - - run: npm run semantic-release + - name: Dry release + uses: cycjimmy/semantic-release-action@v2 + with: + dry_run: true + semantic_version: 17 + branches: | + [ + 'master', + {name: 'alpha', prerelease: true} + ] + env: + # These are not available on forks so we might as well remove them? + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + release: + needs: test + runs-on: ubuntu-latest + if: + ${{ github.repository == 'reactjs/react-transition-group' && + contains('refs/heads/master,refs/heads/alpha', + github.ref) && github.event_name == 'push' }} + steps: + - uses: styfle/cancel-workflow-action@0.9.0 + - uses: actions/checkout@v2 + - name: Use Node.js 14 + uses: actions/setup-node@v2 + with: + node-version: 14 + cache: 'npm' + - run: yarn + - name: Release + uses: cycjimmy/semantic-release-action@v2 + with: + semantic_version: 17 + branches: | + [ + 'master', + {name: 'alpha', prerelease: true} + ] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}