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:
vue create foonpm install --save-dev semantic-releasenpm install @semantic-release/github -D.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}"
}
]
}
]
]
}
version key to 0.0.0-development.
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
feat: pushedThe release seems to be fine but unfortunately it didn't publish the dist directory as a single asset.
It simply published each file inside dist as a single
Adding the step
- name: Log
run: ls
shows that the dist directory exists
How can I fix that?
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"
}