Prepare Sage 0.13.0 release #7
Workflow file for this run
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: NPM | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '**' | |
| pull_request: | |
| branches: | |
| - '**' | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| validate: | |
| name: Validate package | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Linux dependencies | |
| timeout-minutes: 10 | |
| run: | | |
| sudo apt-get -o Acquire::Retries=5 -o Acquire::http::Timeout=30 update | |
| sudo apt-get -o Acquire::Retries=5 -o Acquire::http::Timeout=30 install -y libgtk-3-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| registry-url: 'https://registry.npmjs.org' | |
| package-manager-cache: false | |
| - name: Install supported npm | |
| run: npm install --global npm@11.19.0 | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Check formatting | |
| run: pnpm prettier:check | |
| - name: Lint | |
| run: pnpm lint | |
| - name: Dry-run package | |
| working-directory: packages/sage-app-sdk | |
| run: npm pack --dry-run | |
| publish: | |
| name: Publish to npm | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: validate | |
| runs-on: ubuntu-latest | |
| environment: npm | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Linux dependencies | |
| timeout-minutes: 10 | |
| run: | | |
| sudo apt-get -o Acquire::Retries=5 -o Acquire::http::Timeout=30 update | |
| sudo apt-get -o Acquire::Retries=5 -o Acquire::http::Timeout=30 install -y libgtk-3-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| registry-url: 'https://registry.npmjs.org' | |
| package-manager-cache: false | |
| - name: Install supported npm | |
| run: npm install --global npm@11.19.0 | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Publish | |
| working-directory: packages/sage-app-sdk | |
| run: npm publish |