feat: project setup and complete migration #6
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: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
packages: write | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "npm" | |
- name: nx cache | |
uses: actions/cache@v4 | |
with: | |
path: .nx | |
key: ${{ runner.os }}-nx | |
- run: npm ci | |
- run: npx nx release version | |
- name: Extract new Version | |
run: PACKAGE_VERSION=$(node -p "require('home-assistant-matter-hub/package.json').version") | |
- run: npx nx release changelog --version $PACKAGE_VERSION | |
- run: npm run pull-request | |
- name: Commit, tag and push | |
run: | | |
git commit -m "chore: release v$PACKAGE_VERSION" | |
git tag -a v$PACKAGE_VERSION -m "Release v$PACKAGE_VERSION" -m "[skip ci]" | |
git push --follow-tags | |
- run: npx nx release publish | |
- run: | | |
gh release create v$PACKAGE_VERSION \ | |
--latest \ | |
--notes-file CHANGELOG.md \ | |
--title "v$PACKAGE_VERSION" \ | |
--verify-tag |