Skip to content

feat: project setup and complete migration #12

feat: project setup and complete migration

feat: project setup and complete migration #12

Workflow file for this run

name: Release
on:
push:
branches:
- main
permissions:
contents: write
packages: write
id-token: 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: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: nx cache
uses: actions/cache@v4
with:
path: .nx
key: ${{ runner.os }}-nx
- run: npm ci
- run: npx nx release version --first-release
- name: Extract new Version
run: |
PACKAGE_VERSION=$(node -p "require('home-assistant-matter-hub/package.json').version")
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> "$GITHUB_ENV"
- run: npx nx release changelog --version $PACKAGE_VERSION --first-release
- 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
- env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
run: npx nx release publish --first-release
- run: |
gh release create v$PACKAGE_VERSION \
--latest \
--notes-file CHANGELOG.md \
--title "v$PACKAGE_VERSION" \
--verify-tag