Merge pull request #165 from ducflair/jorgedanisc #40
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 ducjs | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main, next, dev] | |
| paths: | |
| - 'packages/ducjs/**' | |
| - 'package.json' | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| id-token: write | |
| jobs: | |
| release_ducjs: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: release-ducjs | |
| cancel-in-progress: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.ref_name }} | |
| persist-credentials: true | |
| - name: Set Git User | |
| run: | | |
| git config user.name "GitHub Action" | |
| git config user.email "action@github.com" | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: "latest" | |
| # npm 11.5.1 or later must be installed for OIDC to work | |
| - name: Update npm | |
| run: npm install -g npm@latest | |
| - name: Install deps | |
| run: bun install | |
| - name: Build | |
| run: bun ducjs:build | |
| - name: Prepare workspace dependencies for publish | |
| run: node scripts/fix-workspace-deps.mjs packages/ducjs/package.json | |
| - name: Setup release environment | |
| id: setup-release-environment | |
| uses: ./.github/actions/simulate-main-environment | |
| with: | |
| current-branch: ${{ github.ref_name }} | |
| package-name: ducjs | |
| - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies | |
| run: npm audit signatures | |
| - name: Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| working-directory: ./packages/ducjs | |
| run: npx semantic-release ${{ steps.setup-release-environment.outputs.release-mode }} |