Release #178
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: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: Version bump strategy | |
| required: true | |
| default: patch | |
| type: choice | |
| options: [ patch, minor, major, custom ] | |
| custom_version: | |
| description: Custom version (only when version=custom) | |
| required: false | |
| type: string | |
| workflow_run: | |
| workflows: [ 'tests' ] | |
| types: [ completed ] | |
| branches: [ master ] | |
| permissions: | |
| contents: write | |
| id-token: write | |
| pull-requests: write | |
| concurrency: | |
| group: release | |
| jobs: | |
| manual-release: | |
| if: github.event_name == 'workflow_dispatch' | |
| name: Release ${{ inputs.custom_version || inputs.version }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| package-manager-cache: false | |
| - run: | | |
| corepack enable | |
| corepack prepare yarn@stable --activate | |
| - uses: actions/setup-node@v6 | |
| with: | |
| cache: yarn | |
| registry-url: 'https://registry.npmjs.org' | |
| always-auth: false | |
| provenance: true | |
| - run: yarn | |
| - run: yarn build | |
| - name: Configure git | |
| run: | | |
| git config --global user.name 'MikroORM Release Bot' | |
| git config --global user.email 'noreply@mikro-orm.io' | |
| - name: Bump version | |
| run: yarn lerna version ${{ github.event.inputs.custom_version || github.event.inputs.version }} --force-publish --yes | |
| - name: Pin versions | |
| run: | | |
| yarn release:pin-versions | |
| yarn install --no-immutable | |
| git add . | |
| git diff-index --quiet HEAD || git commit -m 'chore(release): update internal dependencies [skip ci]' | |
| git push | |
| - name: Publish to npm | |
| run: yarn publish:prod --yes | |
| canary-release: | |
| if: github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' | |
| name: Release canary | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| package-manager-cache: false | |
| - run: | | |
| corepack enable | |
| corepack prepare yarn@stable --activate | |
| - uses: actions/setup-node@v6 | |
| with: | |
| cache: yarn | |
| - name: Configure git | |
| run: | | |
| git config --global user.name 'MikroORM Release Bot' | |
| git config --global user.email 'noreply@mikro-orm.io' | |
| - run: | | |
| yarn | |
| yarn build | |
| yarn lerna run copy -- -- --canary | |
| git commit -am 'chore: bump canary versions [skip ci]' | |
| git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
| yarn publish:next --yes |