Release #247
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: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Release Version(minor,patch,preminor,prepatch)' | |
required: true | |
default: 'patch' | |
branch: | |
description: 'Release Branch(confirm release branch)' | |
required: true | |
default: 'main' | |
jobs: | |
release: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
node-version: [16.14.0] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.inputs.branch }} | |
- name: Pushing to the protected branch 'protected' | |
uses: CasperWA/push-protected@v2 | |
with: | |
token: ${{ secrets.PUSH_TO_PROTECTED_BRANCH }} | |
branch: ${{ github.event.inputs.branch }} | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache .pnpm-store | |
uses: actions/cache@v2 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
- name: Install pnpm | |
run: curl -f https://get.pnpm.io/v6.14.js | node - add --global pnpm@6 | |
- name: install dependency | |
run: pnpm install --filter=\!garfish-docs | |
- name: release | |
run: node ./scripts/release.js --version=${{ github.event.inputs.version }} | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: changelog | |
run: npx conventional-github-releaser -p angular | |
env: | |
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{secrets.GITHUB_TOKEN}} |