This repository was archived by the owner on Aug 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8ea1e74
chore: simplify Go version upgrade procedure
galargh be13755
chore: add default for the go-version input of release-check
galargh edcc405
Update .github/actions/copy-workflow-go/action.yml
galargh c679ae1
Merge branch 'next' into go-bump
galargh 6acca45
Merge branch 'next' into go-bump
galargh 926439b
Merge branch 'next' into go-bump
galargh f59dcc8
Update configs/README.md
galargh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,23 +4,32 @@ description: Copy workflow steps specific to go | |
| runs: | ||
| using: "composite" | ||
| steps: | ||
| # GitHub Actions Expressions do not support last item access/array length retrieval | ||
| - id: go | ||
| run: echo "::set-output name=version::$(jq -r '.[-1]' <<< '${{ toJSON(matrix.cfg.go.versions) }}')" | ||
| shell: bash | ||
| - uses: actions/setup-go@v3 | ||
| with: | ||
| # This should be the same Go version we use in the go-check workflow. | ||
| # go mod tidy, go vet, staticcheck and gofmt might behave differently depending on the version. | ||
| go-version: "1.19.x" | ||
| go-version: ${{ steps.go.outputs.version }} | ||
| - name: bump go.mod go version if needed | ||
| uses: protocol/[email protected] | ||
| with: | ||
| working-directory: ${{ env.TARGET_REPO_DIR }} | ||
| run: | | ||
| # We want our modules to support two Go versions at a time. | ||
| # As of August 2022, Go 1.19 is the latest stable. | ||
| # go.mod's Go version declares the language version being used. | ||
| # As such, it has to be the minimum of all Go versions supported. | ||
| # Bump this every six months, as new Go versions come out. | ||
| TARGET_VERSION=1.18 | ||
| PREVIOUS_TARGET_VERSION=1.17 | ||
| TARGET_VERSION='${{ matrix.cfg.go.versions[0] }}' | ||
| TARGET_VERSION="${TARGET_VERSION%.x}" | ||
| TARGET_MAJOR_VERSION="${TARGET_VERSION%.[0-9]*}" | ||
| TARGET_MINOR_VERSION="${TARGET_VERSION#[0-9]*.}" | ||
| # Assumptions: | ||
| # - all versions are targetted incrementally | ||
| # - no versions are skipped | ||
| # - patch version is never pinned explicitly | ||
| PREVIOUS_TARGET_VERSION="$TARGET_MAJOR_VERSION.$(($TARGET_MINOR_VERSION-1))" | ||
| # Note that the "<" comparison doesn't understand semver, | ||
| # but it should be good enough for the foreseeable future. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.