Breaking changes in the GitHub upload-artifact action
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.
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.
- uses: actions/upload-artifact@v4 with: include-hidden-files: true name: ${{ inputs.PACKAGE_NAME }} path: .
Related articles
Fix Azure Function Node.js GitHub Actions Windows workflow
Fixing the Azure Function Node.js GitHub Actions Windows workflow to deploy only production dependencies and exclude the node_modules folder from the artifact.
Manual GitHub workflow triggers for Azure Static Web Site
#DevHack: GitHub Actions do not run step on schedule
Report issues or make changes on GitHub
Found a typo or issue in this article? Visit the GitHub repository to make changes or submit a bug report.
Comments
Let's build together
Manage content in VS Code
Present from VS Code