| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- name: Release Subpackages
- on:
- push:
- branches:
- - master
- paths:
- - .changeset/**
- - .github/workflows/release-subpackages.yml
- workflow_run:
- workflows: ["Node CI for app development"]
- types:
- - completed
- branches:
- - master
- concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
- jobs:
- release-subpackages-snapshot:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-node@v4
- with:
- node-version: '20'
- cache: 'yarn'
- cache-dependency-path: '**/yarn.lock'
- - name: Cache/Restore node_modules
- id: cache-dependencies
- uses: actions/cache@v4
- with:
- path: |
- **/node_modules
- key: node_modules-release-subpackages-${{ runner.OS }}-node${{ inputs.node-version }}-${{ hashFiles('**/yarn.lock') }}
- restore-keys: |
- node_modules-release-subpackages-${{ runner.OS }}-node${{ inputs.node-version }}-
- - name: Install dependencies
- run: |
- yarn global add turbo
- yarn global add node-gyp
- yarn --frozen-lockfile
- - name: Setup .npmrc
- run: |
- cat << EOF > "$HOME/.npmrc"
- //registry.npmjs.org/:_authToken=$NPM_TOKEN
- EOF
- env:
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- - name: Snapshot release to npm
- run: |
- yarn release-subpackages:next
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- release-subpackages:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-node@v4
- with:
- node-version: '20'
- cache: 'yarn'
- cache-dependency-path: '**/yarn.lock'
- - name: Cache/Restore node_modules
- id: cache-dependencies
- uses: actions/cache@v4
- with:
- path: |
- **/node_modules
- key: node_modules-release-subpackages-${{ runner.OS }}-node${{ inputs.node-version }}-${{ hashFiles('**/yarn.lock') }}
- restore-keys: |
- node_modules-release-subpackages-${{ runner.OS }}-node${{ inputs.node-version }}-
- - name: Install dependencies
- run: |
- yarn global add turbo
- yarn global add node-gyp
- yarn --frozen-lockfile
- - name: Create Release Pull Request or Publish to npm
- id: changesets
- uses: changesets/action@v1
- with:
- publish: yarn release-subpackages
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|