Release #95
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: | |
workflow_dispatch: | |
jobs: | |
release: | |
name: Release to NPM | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.API_TOKEN_GITHUB }} | |
- name: Install PNPM | |
uses: pnpm/action-setup@6e1964dde3397a825e79e4607ad57f3f7ca2c7cb | |
with: | |
version: 8.6.3 | |
- name: Set up Node v18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
registry-url: " https://registry.npmjs.org" | |
- name: Install dependencies | |
run: pnpm install -r | |
- name: Install turbo globally | |
run: pnpm install -g turbo | |
- name: Build packages | |
run: mv bun.lockb bun.inert && pnpm turbo run build ; mv bun.inert bun.lockb | |
- name: Apply version changes to packages | |
run: pnpm run changeset:version | |
- name: Commit package.json changes | |
uses: EndBug/add-and-commit@v9 | |
with: | |
commit: "--signoff" | |
default_author: github_actor | |
message: "chore: release" | |
push: true | |
- name: Release | |
run: pnpm recursive publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# docker: | |
# runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# service-name: [] | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v2 | |
# - name: Verify Changed files | |
# uses: dorny/paths-filter@v2 | |
# id: verify-changed-files | |
# with: | |
# filters: | | |
# service: | |
# - 'services/${{ matrix.service-name }}/src/**' | |
# - 'services/${{ matrix.service-name }}/package.json' | |
# - name: Set up QEMU | |
# if: steps.verify-changed-files.outputs.service == 'true' | |
# uses: docker/setup-qemu-action@v2 | |
# - name: Set up Docker Buildx | |
# if: steps.verify-changed-files.outputs.service == 'true' | |
# uses: docker/setup-buildx-action@v2 | |
# - name: Login to GCR | |
# if: steps.verify-changed-files.outputs.service == 'true' | |
# uses: docker/login-action@v2 | |
# with: | |
# registry: ghcr.io | |
# username: ${{ github.repository_owner }} | |
# password: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Build and push | |
# if: steps.verify-changed-files.outputs.service == 'true' | |
# uses: docker/build-push-action@v3 | |
# with: | |
# context: . | |
# push: true | |
# tags: ghcr.io/${{ github.repository }}/${{ matrix.service-name }}:latest | |
# file: services/${{ matrix.service-name }}/Dockerfile |