Repository navigation
Merge remote-tracking branch 'origin/main' #70
This file contains hidden or 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 | |
| id-token: write | |
| # This makes the token global for all jobs and steps in this file | |
| env: | |
| NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | |
| jobs: | |
| release: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: ['ubuntu-latest'] | |
| node: ['latest'] | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Cache node modules | |
| uses: actions/cache@v5 | |
| 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@v6 | |
| with: | |
| version: latest | |
| - name: Use Node.js ${{ matrix.node }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: 'pnpm' | |
| - name: Install Dependencies | |
| run: pnpm i --frozen-lockfile | |
| - name: Build project | |
| run: pnpm build | |
| - name: Semantic release | |
| run: npx semantic-release | |
| - name: Import GPG key | |
| uses: crazy-max/ghaction-import-gpg@v7 | |
| 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 build:demo |