diff --git a/docs/breaking-changes/v3.md b/docs/breaking-changes/v3.md new file mode 100644 index 0000000..10c68ae --- /dev/null +++ b/docs/breaking-changes/v3.md @@ -0,0 +1,5 @@ +# Breaking changes in v3 + +The `go-version` input in the `release` and `prerelease` actions no longer exists. + +The action will use the installed version in the runner. diff --git a/prerelease/README.md b/prerelease/README.md index daa9ed1..b372e77 100644 --- a/prerelease/README.md +++ b/prerelease/README.md @@ -18,7 +18,6 @@ GitHub Action that produces a new pre-release (snapshot) of a golang based repos | `checkout-fetch-depth` |

The number of commits to fetch. 0 indicates all history for all branches and tags

| `false` | `0` | | `create-prerelease` |

Whether semantic-release should create a prerelease or do a dry run. This can be useful to set to true when a prerelease requires pushing artifacts semantic-release is in charge of generating

| `false` | `false` | | `github-token` |

GitHub token that can checkout the consumer repository as well as create tags/releases against it. e.g. 'secrets.GITHUB_TOKEN'

| `true` | `""` | -| `go-version` |

Go version to use for building

| `true` | `1.17.3` | | `push-docker-snapshot` |

If a docker snapshot image is generated, push it to the to the registry

| `false` | `false` | | `docker-username` |

Docker username to push the snapshot image to the registry

| `false` | `""` | | `docker-password` |

Docker password to push the snapshot image to the registry

| `false` | `""` | diff --git a/prerelease/action.yaml b/prerelease/action.yaml index 78a3457..7fe4c64 100644 --- a/prerelease/action.yaml +++ b/prerelease/action.yaml @@ -16,10 +16,6 @@ inputs: github-token: description: GitHub token that can checkout the consumer repository as well as create tags/releases against it. e.g. 'secrets.GITHUB_TOKEN' required: true - go-version: - description: Go version to use for building - required: true - default: 1.17.3 # TODO Could this be replaced by create-prerelease + the presence of the docker credentials? push-docker-snapshot: description: If a docker snapshot image is generated, push it to the to the registry @@ -132,11 +128,15 @@ runs: echo "version=${{ steps.prerelease.outputs.new-release-version }}" >> $GITHUB_OUTPUT echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> "$GITHUB_OUTPUT" + - name: Set Go Version + shell: bash + run: | + echo "GOVERSION=$(< .go-version tr -d '\n')" >> $GITHUB_ENV + - name: Goreleaser uses: goreleaser/goreleaser-action@v6 env: GITHUB_TOKEN: ${{ inputs.github-token }} - GOVERSION: ${{ inputs.go-version }} with: args: release diff --git a/release/README.md b/release/README.md index 738eed7..50fa79d 100644 --- a/release/README.md +++ b/release/README.md @@ -21,7 +21,6 @@ GitHub Action that produces a new Release of a golang based repository. | `checkout-repo` |

Perform checkout as first step of action

| `false` | `true` | | `checkout-fetch-depth` |

The number of commits to fetch. 0 indicates all history for all branches and tags

| `false` | `0` | | `github-token` |

GitHub token that can checkout the consumer repository as well as create tags/releases against it. e.g. 'secrets.GITHUB_TOKEN'

| `true` | `""` | -| `go-version` |

Go version to use for building

| `true` | `1.17.3` | | `dry-run` |

Whether to run semantic release in dry-run mode. It will override the dryRun attribute in your configuration file

| `false` | `false` | | `extra-plugins` |

Extra plugins for pre-install. You can also specify specifying version range for the extra plugins if you prefer. Defaults to install @open-turo/semantic-release-config.

| `false` | `@open-turo/semantic-release-config ` | @@ -82,12 +81,6 @@ This action is a `composite` action. # Required: true # Default: "" - go-version: - # Go version to use for building - # - # Required: true - # Default: 1.17.3 - dry-run: # Whether to run semantic release in `dry-run` mode. It will override the `dryRun` attribute in your configuration file # diff --git a/release/action.yaml b/release/action.yaml index 1a8a77f..01c5ec0 100644 --- a/release/action.yaml +++ b/release/action.yaml @@ -12,10 +12,6 @@ inputs: github-token: description: GitHub token that can checkout the consumer repository as well as create tags/releases against it. e.g. 'secrets.GITHUB_TOKEN' required: true - go-version: - description: Go version to use for building - required: true - default: 1.17.3 dry-run: required: false description: Whether to run semantic release in `dry-run` mode. It will override the `dryRun` attribute in your configuration file @@ -85,8 +81,6 @@ runs: env: GITHUB_TOKEN: ${{ inputs.github-token }} GOPRIVATE: github.com/turo/ - # TODO Read this from the .go-version file instead - GOVERSION: ${{ inputs.go-version }} # TODO Handle the prerelease value? How can we get this out of the semantic-release output? # This is done in the goreleaser config file with the prerelease: auto option with: