Skip to content

chore: updates build.yml and release.yml #27

chore: updates build.yml and release.yml

chore: updates build.yml and release.yml #27

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ 'ubuntu-latest' ]
node: [ 'latest' ]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.pnpm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Build packages
run: pnpm run build
- name: Semantic release
run: npx semantic-release
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Update version in source code
run: |
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
version=${latest_tag#v}
bash release.sh $version ${{ secrets.GPG_KEY_ID }}
- name: build demo
run: pnpm run build:ng-kit-demo