-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert build to goreleaser, support arm64, update go dependencies (#70
- Loading branch information
Showing
14 changed files
with
353 additions
and
161 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
name: Bug report | ||
description: Create a report to help us improve | ||
labels: ["bug"] | ||
assignees: [""] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Found a bug? | ||
Please checkout our [Slack Community](https://slack.cloudposse.com) | ||
or visit our [Slack Archive](https://archive.sweetops.com/). | ||
[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com) | ||
- type: textarea | ||
id: concise-description | ||
attributes: | ||
label: Describe the Bug | ||
description: A clear and concise description of what the bug is. | ||
placeholder: What is the bug about? | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: expected | ||
attributes: | ||
label: Expected Behavior | ||
description: A clear and concise description of what you expected. | ||
placeholder: What happened? | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: reproduction-steps | ||
attributes: | ||
label: Steps to Reproduce | ||
description: Steps to reproduce the behavior. | ||
placeholder: How do we reproduce it? | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: screenshots | ||
attributes: | ||
label: Screenshots | ||
description: If applicable, add screenshots or logs to help explain. | ||
validations: | ||
required: false | ||
|
||
- type: textarea | ||
id: environment | ||
attributes: | ||
label: Environment | ||
description: Anything that will help us triage the bug. | ||
placeholder: | | ||
- OS: [e.g. Linux, OSX, WSL, etc] | ||
- Version [e.g. 10.15] | ||
- Module version | ||
- Terraform version | ||
validations: | ||
required: false | ||
|
||
- type: textarea | ||
id: additional | ||
attributes: | ||
label: Additional Context | ||
description: | | ||
Add any other context about the problem here. | ||
validations: | ||
required: false |
This file contains 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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
name: Feature Request | ||
description: Suggest an idea for this project | ||
labels: ["feature request"] | ||
assignees: [""] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Have a question? | ||
Please checkout our [Slack Community](https://slack.cloudposse.com) | ||
or visit our [Slack Archive](https://archive.sweetops.com/). | ||
[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com) | ||
- type: textarea | ||
id: concise-description | ||
attributes: | ||
label: Describe the Feature | ||
description: A clear and concise description of what the feature is. | ||
placeholder: What is the feature about? | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: expected | ||
attributes: | ||
label: Expected Behavior | ||
description: A clear and concise description of what you expected. | ||
placeholder: What happened? | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: use-case | ||
attributes: | ||
label: Use Case | ||
description: | | ||
Is your feature request related to a problem/challenge you are trying | ||
to solve? | ||
Please provide some additional context of why this feature or | ||
capability will be valuable. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: ideal-solution | ||
attributes: | ||
label: Describe Ideal Solution | ||
description: A clear and concise description of what you want to happen. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: alternatives-considered | ||
attributes: | ||
label: Alternatives Considered | ||
description: Explain alternative solutions or features considered. | ||
validations: | ||
required: false | ||
|
||
- type: textarea | ||
id: additional | ||
attributes: | ||
label: Additional Context | ||
description: | | ||
Add any other context about the problem here. | ||
validations: | ||
required: false |
This file contains 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 |
---|---|---|
@@ -1,13 +1,21 @@ | ||
## what | ||
* Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?) | ||
* Use bullet points to be concise and to the point. | ||
|
||
<!-- | ||
- Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?) | ||
- Use bullet points to be concise and to the point. | ||
--> | ||
|
||
## why | ||
* Provide the justifications for the changes (e.g. business case). | ||
* Describe why these changes were made (e.g. why do these commits fix the problem?) | ||
* Use bullet points to be concise and to the point. | ||
|
||
<!-- | ||
- Provide the justifications for the changes (e.g. business case). | ||
- Describe why these changes were made (e.g. why do these commits fix the problem?) | ||
- Use bullet points to be concise and to the point. | ||
--> | ||
|
||
## references | ||
* Link to any supporting github issues or helpful documentation to add some context (e.g. stackoverflow). | ||
* Use `closes #123`, if this PR closes a GitHub issue `#123` | ||
|
||
<!-- | ||
- Link to any supporting github issues or helpful documentation to add some context (e.g. stackoverflow). | ||
- Use `closes #123`, if this PR closes a GitHub issue `#123` | ||
--> |
This file contains 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 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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: 'goreleaser' | ||
|
||
on: | ||
pull_request: | ||
types: [ opened, synchronize, reopened ] | ||
|
||
release: | ||
types: [ published ] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: 'Build Binaries' | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the repo | ||
- name: 'Checkout' | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Setup Go | ||
- name: 'Setup Go' | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.19' | ||
|
||
# Print Go version | ||
- run: go version | ||
|
||
# Build and release | ||
- name: Build release | ||
if: (github.event_name == 'release' && github.event.action == 'published') || (github.event_name == 'workflow_dispatch' && github.ref_name == 'master') | ||
uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Trial build | ||
- name: Test build | ||
if: github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && github.ref_name != 'master') | ||
uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean --snapshot |
This file contains 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 was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
|
@@ -9,7 +9,8 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout source code at current commit" | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v2 | ||
# Leave pinned at 0.7.1 until https://github.com/mszostok/codeowners-validator/issues/173 is resolved | ||
- uses: mszostok/[email protected] | ||
if: github.event.pull_request.head.repo.full_name == github.repository | ||
name: "Full check of CODEOWNERS" | ||
|
@@ -20,8 +21,8 @@ jobs: | |
checks: "syntax,owners,duppatterns" | ||
owner_checker_allow_unowned_patterns: "false" | ||
# GitHub access token is required only if the `owners` check is enabled | ||
github_access_token: "${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}" | ||
- uses: mszostok/[email protected].4 | ||
github_access_token: "${{ secrets.REPO_ACCESS_TOKEN }}" | ||
- uses: mszostok/[email protected].1 | ||
if: github.event.pull_request.head.repo.full_name != github.repository | ||
name: "Syntax check of CODEOWNERS" | ||
with: | ||
|
This file contains 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Visit https://goreleaser.com for documentation on how to customize this behavior. | ||
|
||
before: | ||
#hooks: | ||
# - 'go mod tidy' | ||
|
||
builds: | ||
- env: | ||
# goreleaser does not work with CGO, it could also complicate | ||
# usage by users in CI/CD systems like Terraform Cloud where | ||
# they are unable to install libraries. | ||
- CGO_ENABLED=0 | ||
mod_timestamp: '{{ .CommitTimestamp }}' | ||
goos: | ||
- darwin | ||
- freebsd | ||
- windows | ||
- linux | ||
goarch: | ||
- amd64 | ||
- '386' | ||
- arm | ||
- arm64 | ||
binary: atmos | ||
ldflags: | ||
# -s Omit the symbol table and debug information | ||
# -w Omit the DWARF symbol table | ||
# -X importpath.name=value # set the value of the string variable in importpath named name to value | ||
# Someday we could implement a "version" command and set the version like this: | ||
# - '-s -w -X "github.com/cloudposse/github-commenter/cmd.Version={{.Env.GORELEASER_CURRENT_TAG}}"' | ||
- '-s -w' | ||
|
||
archives: | ||
- format: binary | ||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}' | ||
|
||
checksum: | ||
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS' | ||
algorithm: sha256 | ||
|
||
release: | ||
# If you want to manually examine the release before it is live, uncomment this line: | ||
# draft: true | ||
|
||
changelog: | ||
skip: true |
Oops, something went wrong.