diff --git a/README.md b/README.md index 3eb9915..6d8664e 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ jobs: # either 'goreleaser' (default) or 'goreleaser-pro' distribution: goreleaser # 'latest', 'nightly', or a semver - version: '~> v1' + version: '~> v2' args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -96,7 +96,7 @@ Or with a condition on GoReleaser step: uses: goreleaser/goreleaser-action@v5 if: startsWith(github.ref, 'refs/tags/') with: - version: '~> v1' + version: '~> v2' args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -121,7 +121,7 @@ the [Import GPG](https://github.com/crazy-max/ghaction-import-gpg) GitHub Action name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 with: - version: '~> v1' + version: '~> v2' args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -146,7 +146,7 @@ purpose. You can do that with the [actions/upload-artifact](https://github.com/a name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 with: - version: '~> v1' + version: '~> v2' args: release --clean workdir: myfolder env: @@ -182,7 +182,7 @@ Following inputs can be used as `step.with` keys | Name | Type | Default | Description | |------------------|---------|--------------|------------------------------------------------------------------| | `distribution` | String | `goreleaser` | GoReleaser distribution, either `goreleaser` or `goreleaser-pro` | -| `version`**¹** | String | `~> v1` | GoReleaser version | +| `version`**¹** | String | `~> v2` | GoReleaser version | | `args` | String | | Arguments to pass to GoReleaser | | `workdir` | String | `.` | Working directory (below repository root) | | `install-only` | Bool | `false` | Just install GoReleaser | @@ -221,7 +221,7 @@ secret named `GH_PAT`, the step will look like this: name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 with: - version: '~> v1' + version: '~> v2' args: release --clean env: GITHUB_TOKEN: ${{ secrets.GH_PAT }} diff --git a/action.yml b/action.yml index 98f2abd..6e9f6e2 100644 --- a/action.yml +++ b/action.yml @@ -13,7 +13,7 @@ inputs: required: false version: description: 'GoReleaser version' - default: '~> v1' + default: '~> v2' required: false args: description: 'Arguments to pass to GoReleaser' diff --git a/src/context.ts b/src/context.ts index 845da4e..b5f63f6 100644 --- a/src/context.ts +++ b/src/context.ts @@ -15,7 +15,7 @@ export interface Inputs { export async function getInputs(): Promise { return { distribution: core.getInput('distribution') || 'goreleaser', - version: core.getInput('version') || '~> v1', + version: core.getInput('version') || '~> v2', args: core.getInput('args'), workdir: core.getInput('workdir') || '.', installOnly: core.getBooleanInput('install-only') diff --git a/src/github.ts b/src/github.ts index 776d997..3bcf8d8 100644 --- a/src/github.ts +++ b/src/github.ts @@ -10,7 +10,7 @@ export interface GitHubRelease { export const getRelease = async (distribution: string, version: string): Promise => { if (version === 'latest') { core.warning("You are using 'latest' as default version. Will lock to '~> v2'."); - return getReleaseTag(distribution, '~> v1'); + return getReleaseTag(distribution, '~> v2'); } return getReleaseTag(distribution, version); };