diff --git a/.github/workflows/release-web.yml b/.github/workflows/release-web.yml index 0333997..648cfbd 100644 --- a/.github/workflows/release-web.yml +++ b/.github/workflows/release-web.yml @@ -106,7 +106,44 @@ jobs: github_token: ${{ secrets.GH_RW_TOKEN }} branch: "main" tags: true - + + publish: + runs-on: ubuntu-latest + needs: 'release' + + steps: + ## First, we'll checkout the repository. We don't persist credentials because we need a + ## Personal Access Token to push on a branch that is protected. See + ## https://github.com/cycjimmy/semantic-release-action#basic-usage + - uses: actions/checkout@v3 + with: + persist-credentials: false + fetch-depth: 0 # Used for conventional commit ranges + + ## This step installs node and sets up several matchers (regex matching for Github + ## Annotations). See + ## https://github.com/actions/setup-node/blob/25316bbc1f10ac9d8798711f44914b1cf3c4e954/src/main.ts#L58-L65 + - uses: actions/setup-node@v3 + with: + node-version: '18.x' + registry-url: https://registry.npmjs.org + + ## The caching steps create a cache key based on the OS and hash of the yarn.lock file. A + ## cache hit will copy files from Github cache into the `node_modules` and `.cache/cypress` + ## folders. A cache hit will skip the cache steps + - name: Cache node modules + id: npm-cache + uses: actions/cache@v3 + with: + path: node_modules + key: ${{ runner.os }}-18.x-node-modules-hash-${{ hashFiles('package-lock.json') }} + + ## If both `node_modules` and `.cache/cypress` were cache hits, we're going to skip the `yarn + ## install` step. This effectively saves up to 3m on a cache hit build. + - name: Install Packages + if: steps.npm-cache.outputs.cache-hit != 'true' + run: npm install --production=false + - name: Creating .npmrc run: | cat << EOF > "$HOME/.npmrc"