From 3e72fd4adcfab5a559e5ac3aa12f9c40065940b2 Mon Sep 17 00:00:00 2001 From: Dylan Piercey Date: Mon, 21 Mar 2022 13:08:35 -0700 Subject: [PATCH] chore: move release into the ci workflow --- .github/workflows/ci.yml | 21 +++++++++++++++++++++ .github/workflows/release.yml | 27 --------------------------- .releaserc.json | 5 +---- 3 files changed, 22 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a6deab58..53e31e7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,3 +43,24 @@ jobs: run: npm run ci:test - name: Report code coverage uses: codecov/codecov-action@v2 + release: + runs-on: ubuntu-latest + needs: [lint, test] + steps: + - name: Check releasable + if: ${{ github.repository == 'marko-js/htmljs-parser' && github.ref == 'refs/heads/next' && github.event_name == 'push' }} + run: exit 0 + - name: Checkout code + uses: actions/checkout@v2 + - name: Setup node + uses: actions/setup-node@v2 + with: + node-version: 16.x + cache: "npm" + - name: Install dependencies + run: npm ci + - name: Release + run: npm run release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index a1789b46..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Release - -on: - workflow_run: - branches: ["main", "next"] - workflows: ["CI"] - types: [completed] - -jobs: - release: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Setup node - uses: actions/setup-node@v2 - with: - node-version: 16.x - cache: "npm" - - name: Install dependencies - run: npm ci - - name: Release - run: npm run release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.releaserc.json b/.releaserc.json index c3db3aa2..b8c6342f 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -1,6 +1,3 @@ { - "branches": [ - "main", - { "name": "next", "channel": "next", "prerelease": true } - ] + "branches": ["+([0-9])?(.{+([0-9]),x}).x", "main", "next"] }