Breaking changes in the GitHub upload-artifact action

post

In August 2024, GitHub announced it would exclude hidden files by default in the actions/upload-artifact GitHub Action. If you are using this action in your workflow, you should be aware of this change, as it might break your workflow.

info

Read more about it on the notice of upcoming deprecations and breaking changes in GitHub Actions runners blog post from GitHub.

In my case, for Front Matter CMS, I use a two-step workflow. In the first step, the localization files are generated, and in the second step, the extension is built and published.

Suddenly, I noticed the builds were failing because some files were missing. One of those was the .vscodeignore file.

While unaware of this change, I looked into the issue and quickly discovered that it was due to the change in the actions/upload-artifact action. To fix this, I had to add the include-hidden-files input to the action.

1
2
3
4
5
- uses: actions/upload-artifact@v4
  with:
    include-hidden-files: true
    name: ${{ inputs.PACKAGE_NAME }}
    path: .

Comments

Back to top