diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 908d8bf..a9cf034 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: push: - branches: [main] + branches: [main, beta] pull_request: branches: [main] @@ -48,31 +48,29 @@ jobs: - name: Build and Test run: pnpm test - # Uncomment this job when ready to semantic-release - # - # release: - # runs-on: ubuntu-latest - # needs: ["test"] - # if: "!contains(github.event.head_commit.message, 'skip-release') && !contains(github.event.head_commit.message, 'skip-ci') && github.event_name != 'pull_request'" - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-node@v2 - # with: - # node-version: 14.x - # - name: Cache ~/.pnpm-store - # uses: actions/cache@v2 - # env: - # cache-name: cache-pnpm-store - # with: - # path: ~/.pnpm-store - # key: ${{ runner.os }}-${{ matrix.node-version }}-release-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} - # restore-keys: | - # ${{ runner.os }}-${{ matrix.node-version }}-release-${{ env.cache-name }}- - # ${{ runner.os }}-${{ matrix.node-version }}-release- - # ${{ runner.os }}- - # - run: npm i -g pnpm - # - run: pnpm i - # - run: pnpx -y semantic-release --branches main - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + release: + runs-on: ubuntu-latest + needs: ["test"] + if: "!contains(github.event.head_commit.message, 'skip-release') && !contains(github.event.head_commit.message, 'skip-ci') && github.event_name != 'pull_request'" + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14.x + - name: Cache ~/.pnpm-store + uses: actions/cache@v2 + env: + cache-name: cache-pnpm-store + with: + path: ~/.pnpm-store + key: ${{ runner.os }}-${{ matrix.node-version }}-release-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.node-version }}-release-${{ env.cache-name }}- + ${{ runner.os }}-${{ matrix.node-version }}-release- + ${{ runner.os }}- + - run: npm i -g pnpm + - run: pnpm i + - run: pnpx -y semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index b598ec5..1b1fa9a 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,15 @@ "type": "git", "url": "git+https://github.com/rsuite/formik.git" }, + "release": { + "branches": [ + "main", + { + "name": "beta", + "prerelease": true + } + ] + }, "keywords": [], "author": "Doma ", "license": "MIT",