Skip to content

Merge pull request #24 from semantic-release-action/renovate/major-se… #28

Merge pull request #24 from semantic-release-action/renovate/major-se…

Merge pull request #24 from semantic-release-action/renovate/major-se… #28

Workflow file for this run

---
name: Release
on:
push:
branches:
- master
- next
- next-major
- beta
- alpha
- "[0-9]+.[0-9]+.x"
- "[0-9]+.x"
# Only allow one release workflow to execute at a time, since each release
# workflow uses shared resources (git tags, package registries)
concurrency:
group: ${{ github.workflow }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Configure Node.js path
run: |
# shellcheck disable=SC2129
echo "node_workdir=$GITHUB_WORKSPACE/semantic-release/" >> "$GITHUB_ENV"
echo "semantic_release=$GITHUB_WORKSPACE/semantic-release/node_modules/.bin/semantic-release" >> "$GITHUB_ENV"
echo NODE_PATH="$GITHUB_WORKSPACE/semantic-release/${NODE_PATH:+":$NODE_PATH"}" >> "$GITHUB_ENV"
- name: Cache npm dependencies
uses: actions/cache@v3
id: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('semantic-release/package-lock.json') }}
- name: Install npm dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts
working-directory: ${{ env.node_workdir }}
- name: Release
run: ${semantic_release}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}