Unverified Commit c2f65d89 authored by Hong Minhee's avatar Hong Minhee
Browse files

Rename build.yaml to main.yaml



Prepare for extracting npm publish workflow to a reusable workflow.
The npm publish workflow will be named build.yaml so that legacy
maintenance branches can continue to use npm trusted publishing.

Co-Authored-By: default avatarClaude Opus 4.5 <noreply@anthropic.com>
parent e028df05
Loading
Loading
Loading
Loading
+11 −17
Original line number Diff line number Diff line
@@ -265,6 +265,10 @@ jobs:
          fedify-*.tgz
          packages/cli/fedify-cli-*.tar.xz
          packages/cli/fedify-cli-*.zip
    - uses: actions/upload-artifact@v4
      with:
        name: npm-packages
        path: fedify-*.tgz
    - if: github.event_name == 'push' && github.ref_type == 'tag'
      uses: softprops/action-gh-release@v1
      with:
@@ -290,23 +294,13 @@ jobs:
          sleep 30
          ((attempt++))
        done
    - run: |
        set -ex
        for pkg in fedify-*.tgz; do
          if [[ "$GITHUB_REF_TYPE" = "tag" ]]; then
            npm publish --logs-dir=. --provenance --access public "$pkg" \
              || grep "Cannot publish over previously published version" *.log
            rm *.log
          else
            npm publish \
              --logs-dir=. \
              --provenance \
              --access public \
              --tag dev \
              "$pkg" \
              || grep "Cannot publish over previously published version" *.log
          fi
        done

  publish-npm:
    if: github.event_name == 'push'
    needs: [publish]
    uses: ./.github/workflows/npm-publish.yaml
    with:
      tag: ${{ github.ref_type == 'tag' && 'latest' || 'dev' }}

  publish-examples-blog:
    if: github.event_name == 'push'