Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

504
Views
How to publish a whole directory using Github Actions with the semantic-release Github plugin?

I want to publish a whole directory (the build directory) on a Github release using semantic-release but unfortunately it releases each build file as a single asset.

For reproduction:

  • I'm using the Vue CLI to generate a project vue create foo
  • Install semantic-release as a dev dependency npm install --save-dev semantic-release
  • Install the Github plugin for semantic-release npm install @semantic-release/github -D
  • Create a .releaserc.json with the content

.

{
    "plugins":[
      "@semantic-release/commit-analyzer",
      "@semantic-release/release-notes-generator",
      [
        "@semantic-release/github",
        {
          "assets":[
            {
              "path":"dist",
              "label":"foo-${nextRelease.gitTag}"
            }
          ]
        }
      ]
    ]
  }
  • Inside the package.json set the version key to 0.0.0-development
  • Create a .github/workflows directory with the workflow ci.yml

.

name: CI

on:
  push:
    branches:
      - main

jobs:
  ci:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: Setup Node
        uses: actions/setup-node@v2
        with:
          node-version: 16.x

      - name: Install dependencies
        run: npm install

      - name: Run build
        run: npm run build

      - name: Release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: npx semantic-release --branches main
  • Commit and push it with feat: pushed

The release seems to be fine but unfortunately it didn't publish the dist directory as a single asset.

enter image description here

It simply published each file inside dist as a single

enter image description here

Adding the step

  - name: Log
    run: ls

shows that the dist directory exists

enter image description here

How can I fix that?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

It seems this is not possible. So I have to add this step after building the app

  - name: ZIP build
    run: zip -r dist.zip dist

and set the assets config to

        {
          "path":"dist.zip",
          "label":"foo-${nextRelease.gitTag}.zip"
        }
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!