Merge pull request #119 from ducflair/jorgedanisc #27
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 ducsvg | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main, next, dev] | |
| paths: | |
| - 'packages/ducsvg/**' | |
| - 'package.json' | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| release_ducsvg: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: release-ducsvg | |
| 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 Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: "latest" | |
| - name: Install deps | |
| run: bun install | |
| - name: Build | |
| run: bun ducsvg:build | |
| - name: Prepare workspace dependencies for publish | |
| run: node scripts/fix-workspace-deps.mjs packages/ducsvg/package.json | |
| - name: Configure npm auth for publish | |
| run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Setup release environment | |
| id: setup-release-environment | |
| uses: ./.github/actions/simulate-main-environment | |
| with: | |
| current-branch: ${{ github.ref_name }} | |
| package-name: ducsvg | |
| - name: Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| # DEBUG: "semantic-release:*" # For verbose logging | |
| working-directory: ./packages/ducsvg | |
| run: npx semantic-release ${{ steps.setup-release-environment.outputs.release-mode }} |