ci: fix up release script #216
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: semantic-release | |
on: | |
push: | |
branches: [master, alpha, beta] | |
workflow_dispatch: | |
jobs: | |
semantic-release-version: | |
name: Running semantic-release | |
if: "!contains(toJSON(github.event.commits.*.message), 'chore(release):')" | |
runs-on: ubuntu-latest | |
env: | |
CI: true | |
steps: | |
- name: 🛒 Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_TOKEN }} | |
- name: 💿 Setup Nodejs | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: 'https://npm.pkg.github.com' | |
- name: 💾 Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: 💾 Cache | |
uses: actions/cache@v3 | |
id: yarn-cache | |
with: | |
path: | | |
**/node_modules | |
${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn | |
- name: 🧩 Install dependencies | |
if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: yarn install --prefer-offline --frozen-lockfile | |
- name: 🔨 Build | |
run: yarn build:libs | |
env: | |
CI: false | |
- name: ⚙️ Test and Coverage | |
run: yarn test:cov-badges | |
- name: 📦 Release packages | |
run: | | |
npm config set workspaces-update false | |
yarn release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |