BetaHuhn / metadata-scraper

🏷️ A JavaScript library for scraping/parsing metadata from a web page.

Home Page:https://mxis.ch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Publish pipeline doesn't build before publishing

BetaHuhn opened this issue · comments

Your publishing pipeline seems to be automated, but it doesn't look like it's actually building your package before publishing it.

Originally posted by @utrolig in #64

I will investigate the issue this evening. Here's the GitHub Action which handles the release. I guess the build job shouldn't be separate from the release job and instead we should build the files right before running the release action.

That seems about right.
I think you could probably scrap the whole build section, and just add npm run build to the release step

release:
    needs: [lint]
    name: Build and release
    runs-on: ubuntu-latest
    if: "!contains(github.event.head_commit.message, '[skip ci]')"
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Setup Node.js
        uses: actions/setup-node@v2
        with:
          node-version: 14
      - name: Cache node modules
        uses: c-hive/gha-npm-cache@v1
      - name: Install dependencies
        run: npm ci
      - name: Run build command:
        run: npm run build
      - name: Run Semantic Release
        run: npx semantic-release
        env:
          GITHUB_TOKEN: ${{ secrets.GH_PAT }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
          GIT_AUTHOR_NAME: "BetaHuhn Bot"
          GIT_AUTHOR_EMAIL: "bot@mxis.ch"
          GIT_COMMITTER_NAME: "BetaHuhn Bot"
          GIT_COMMITTER_EMAIL: "bot@mxis.ch"

Yes exactly.

I will fix this in the evening when I am off work or if you want you can create a PR.

Fixed in #66, thanks @utrolig!

I will release a new version later which should hopefully include the built files.