Merge pull request #41 from ddelnano/upgrade-terraform-sdk-go-version-and-release-process
Upgrade packer-plugin-sdk, go version and release process
This commit is contained in:
commit
1e35a0da41
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
@ -1,8 +1,8 @@
|
|||||||
# This GitHub action can publish assets for release when a tag is created.
|
# This GitHub action can publish assets for release when a tag is created.
|
||||||
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
|
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
|
||||||
#
|
#
|
||||||
# This uses an action (paultyng/ghaction-import-gpg) that assumes you set your
|
# This uses an action (hashicorp/ghaction-import-gpg) that assumes you set your
|
||||||
# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `PASSPHRASE`
|
# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `GPG_PASSPHRASE`
|
||||||
# secret. If you would rather own your own GPG handling, please fork this action
|
# secret. If you would rather own your own GPG handling, please fork this action
|
||||||
# or use an alternative one for key handling.
|
# or use an alternative one for key handling.
|
||||||
#
|
#
|
||||||
@ -25,16 +25,16 @@ jobs:
|
|||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.16
|
go-version: 1.17
|
||||||
- name: Describe plugin
|
- name: Describe plugin
|
||||||
id: plugin_describe
|
id: plugin_describe
|
||||||
run: echo "::set-output name=api_version::$(go run . describe | jq -r '.api_version')"
|
run: echo "::set-output name=api_version::$(go run . describe | jq -r '.api_version')"
|
||||||
- name: Import GPG key
|
- name: Import GPG key
|
||||||
id: import_gpg
|
id: import_gpg
|
||||||
uses: paultyng/ghaction-import-gpg@v2.1.0
|
uses: hashicorp/ghaction-import-gpg@v2.1.0
|
||||||
env:
|
env:
|
||||||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
PASSPHRASE: ${{ secrets.PASSPHRASE }}
|
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v2
|
uses: goreleaser/goreleaser-action@v2
|
||||||
with:
|
with:
|
||||||
|
@ -1,30 +1,25 @@
|
|||||||
|
|
||||||
# This is an example goreleaser.yaml file with some sane defaults.
|
# This is an example goreleaser.yaml file with some sane defaults.
|
||||||
# Make sure to check the documentation at http://goreleaser.com
|
# Make sure to check the documentation at http://goreleaser.com
|
||||||
env:
|
env:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
before:
|
before:
|
||||||
hooks:
|
hooks:
|
||||||
# We strongly recommend running tests to catch any regression before release.
|
# TODO(ddelnano): for now there aren't tests to run
|
||||||
# Even though, this an optional step.
|
|
||||||
# - go test ./...
|
# - go test ./...
|
||||||
|
# As part of the release doc files are included as a separate deliverable for
|
||||||
|
# consumption by Packer.io. To include a separate docs.zip uncomment the following command.
|
||||||
|
#- make ci-release-docs
|
||||||
|
# Check plugin compatibility with required version of the Packer SDK
|
||||||
|
- make plugin-check
|
||||||
builds:
|
builds:
|
||||||
# A separated build to run the packer-plugins-check only once for a linux_amd64 binary
|
# A separated build to run the packer-plugins-check only once for a linux_amd64 binary
|
||||||
-
|
-
|
||||||
id: plugin-check
|
id: plugin-check
|
||||||
mod_timestamp: '{{ .CommitTimestamp }}'
|
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||||
hooks:
|
|
||||||
post:
|
|
||||||
# This will check plugin compatibility against latest version of Packer
|
|
||||||
- cmd: |
|
|
||||||
go install github.com/hashicorp/packer/cmd/packer-plugins-check@latest &&
|
|
||||||
packer-plugins-check -load={{ .Name }}
|
|
||||||
dir: "{{ dir .Path}}"
|
|
||||||
flags:
|
flags:
|
||||||
- -trimpath #removes all file system paths from the compiled executable
|
- -trimpath #removes all file system paths from the compiled executable
|
||||||
ldflags:
|
ldflags:
|
||||||
- '-s -w -X main.Version={{.Version}} -X main.VersionPrerelease= '
|
- '-s -w -X {{ .ModulePath }}/version.Version={{.Version}} -X {{ .ModulePath }}/version.VersionPrerelease= '
|
||||||
goos:
|
goos:
|
||||||
- linux
|
- linux
|
||||||
goarch:
|
goarch:
|
||||||
@ -35,7 +30,7 @@ builds:
|
|||||||
flags:
|
flags:
|
||||||
- -trimpath #removes all file system paths from the compiled executable
|
- -trimpath #removes all file system paths from the compiled executable
|
||||||
ldflags:
|
ldflags:
|
||||||
- '-s -w -X main.version={{.Version}} -X main.VersionPrerelease= '
|
- '-s -w -X {{ .ModulePath }}/version.Version={{.Version}} -X {{ .ModulePath }}/version.VersionPrerelease= '
|
||||||
goos:
|
goos:
|
||||||
- freebsd
|
- freebsd
|
||||||
- windows
|
- windows
|
||||||
@ -51,10 +46,11 @@ builds:
|
|||||||
goarch: '386'
|
goarch: '386'
|
||||||
- goos: linux
|
- goos: linux
|
||||||
goarch: amd64
|
goarch: amd64
|
||||||
|
|
||||||
binary: '{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}'
|
binary: '{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}'
|
||||||
archives:
|
archives:
|
||||||
- format: zip
|
- format: zip
|
||||||
|
files:
|
||||||
|
- none*
|
||||||
name_template: '{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}'
|
name_template: '{{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}'
|
||||||
checksum:
|
checksum:
|
||||||
name_template: '{{ .ProjectName }}_v{{ .Version }}_SHA256SUMS'
|
name_template: '{{ .ProjectName }}_v{{ .Version }}_SHA256SUMS'
|
||||||
@ -72,7 +68,7 @@ signs:
|
|||||||
- "--detach-sign"
|
- "--detach-sign"
|
||||||
- "${artifact}"
|
- "${artifact}"
|
||||||
release:
|
release:
|
||||||
# If you want to manually examine the release before its live, uncomment this line:
|
|
||||||
draft: true
|
draft: true
|
||||||
|
|
||||||
changelog:
|
changelog:
|
||||||
skip: true
|
skip: true
|
||||||
|
9
go.mod
9
go.mod
@ -4,12 +4,13 @@ go 1.16
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/amfranz/go-xmlrpc-client v0.0.0-20190612172737-76858463955d
|
github.com/amfranz/go-xmlrpc-client v0.0.0-20190612172737-76858463955d
|
||||||
github.com/hashicorp/hcl/v2 v2.8.0
|
github.com/hashicorp/hcl/v2 v2.12.0
|
||||||
github.com/hashicorp/packer-plugin-sdk v0.1.0
|
github.com/hashicorp/packer-plugin-sdk v0.3.0
|
||||||
github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed
|
github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed
|
||||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
|
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
|
||||||
|
github.com/stretchr/objx v0.2.0 // indirect
|
||||||
github.com/terra-farm/go-xen-api-client v0.0.2
|
github.com/terra-farm/go-xen-api-client v0.0.2
|
||||||
github.com/zclconf/go-cty v1.7.0
|
github.com/zclconf/go-cty v1.10.0
|
||||||
golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9
|
golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f
|
||||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
|
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user