This is a re-submission of #672 removing the issue caused by cycjimmy/semantic-release-action v2. PR #712 has bumped cycjimmy/semantic-release-action to v3 which has resolved the previous deprecation warnings.
Workflow location
.github/workflows/main.yml
Issue 1 - parameter branch
The action cycjimmy/semantic-release-action's README: Inputs lists the parameters branches and branch as follows:
| Input Parameter |
Required |
Description |
| branches |
false |
The branches on which releases should happen.[Details] Support for semantic-release above v16. |
| branch |
false |
The branch on which releases should happen.[Details] Only support for semantic-release older than v16. |
Logs show "ℹ Running semantic-release version 19.0.5" which is newer that semantic-release v16 (see above), so the input parameter branch is not correct.
Issue 2 - failure in fork
When main.yml executes on a GitHub fork, it fails with an Annotations error:
"SemanticReleaseError: Cannot push to the Git repository."
In detail "The command "git push --dry-run --no-verify https://x-access-token:[secure]@github.com/cypress-io/github-action.git HEAD:master" fails with the error message remote: Permission to cypress-io/github-action.git denied to github-actions[bot]."
Instead of failing it should skip trying to run on a fork.
Suggestions
Change cycjimmy/semantic-release-action parameter to branches
Change branch: master to branches: master.
Although the parameter branch: currently works, changing it to branches: makes it conformant to the documentation.
Prevent cycjimmy/semantic-release-action running in fork
|
if: github.ref == 'refs/heads/master' |
Add if condition to ensure it only tries to release when it is running on cypress-io/github-action. See Example: Only run job for specific repository.
For instance, consider adding:
if: github.repository == 'cypress-io/github-action'
Workaround
Disable the workflow .github/workflows/main.yml in the fork to prevent failures. See GitHub help: Disabling and enabling a workflow.
This is a re-submission of #672 removing the issue caused by cycjimmy/semantic-release-action v2. PR #712 has bumped cycjimmy/semantic-release-action to v3 which has resolved the previous deprecation warnings.
Workflow location
.github/workflows/main.yml
Issue 1 - parameter
branchThe action cycjimmy/semantic-release-action's README: Inputs lists the parameters
branchesandbranchas follows:Support for semantic-release above v16.
Only support for semantic-release older than v16.
Logs show "ℹ Running semantic-release version 19.0.5" which is newer that semantic-release v16 (see above), so the input parameter
branchis not correct.github-action/.github/workflows/main.yml
Line 43 in a615f35
Issue 2 - failure in fork
When main.yml executes on a GitHub fork, it fails with an Annotations error:
"SemanticReleaseError: Cannot push to the Git repository."
In detail "The command "git push --dry-run --no-verify https://x-access-token:[secure]@github.com/cypress-io/github-action.git HEAD:master" fails with the error message remote: Permission to cypress-io/github-action.git denied to github-actions[bot]."
Instead of failing it should skip trying to run on a fork.
Suggestions
Change cycjimmy/semantic-release-action parameter to branches
Change
branch: mastertobranches: master.Although the parameter
branch:currently works, changing it tobranches:makes it conformant to the documentation.Prevent cycjimmy/semantic-release-action running in fork
github-action/.github/workflows/main.yml
Line 33 in a615f35
Add
ifcondition to ensure it only tries to release when it is running on cypress-io/github-action. See Example: Only run job for specific repository.For instance, consider adding:
Workaround
Disable the workflow
.github/workflows/main.ymlin the fork to prevent failures. See GitHub help: Disabling and enabling a workflow.