Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to generate and export GPG key for releasing packer plugin #6

Merged
merged 1 commit into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/doc-ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: npm run build
continue-on-error: true # HC closed source tutorials page, we can't get it anyway
- name: Bundle up a GitHub Pages Deployable
if: github.ref == 'refs/heads/master'
# if: github.ref == 'refs/heads/master'
run: |
mkdir hashicorp-packer-docs
cp -r website-preview/.next/server/pages/* hashicorp-packer-docs
Expand Down
22 changes: 19 additions & 3 deletions website/content/docs/plugins/creation/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,28 @@ Here's what you need to create releases using GitHub Actions:
curl -L -o .github/workflows/release.yml \
https://raw.githubusercontent.com/hashicorp/packer-plugin-scaffolding/main/.github/workflows/release.yml
```
4. Go to your repository page on GitHub and navigate to Settings > Secrets. Add
4. [Generate GPG key](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key):
```sh
gpg --full-generate-key
```
Choose all default options if available
5. Export GPG key
```sh
$ gpg --list-secret-keys --keyid-format=long
/Users/hubot/.gnupg/secring.gpg
------------------------------------
sec 4096R/3AA5C34371567BD2 2016-03-10 [expires: 2017-03-10]
uid Hubot <hubot@example.com>
ssb 4096R/4BB6D45482678BE3 2016-03-10

gpg --armor --export-secret-keys 3AA5C34371567BD2
```
6. Go to your repository page on GitHub and navigate to Settings > Secrets. Add
the following secrets:
- `GPG_PRIVATE_KEY` - Your ASCII-armored GPG private key. You can export this with `gpg --armor --export-secret-keys [key ID or email]`.
- `GPG_PASSPHRASE` - The passphrase for your GPG private key.
5. Push a new valid version tag (e.g. `v1.2.3`) to test that the GitHub Actions
releaser is working. The tag must be a valid
7. Push a new valid version tag (e.g. `v1.2.3`) to test that the GitHub Actions
releaser is working. The tag can be created using `git tag -a v1.2.3 -m "v1.2.3"` must be a valid
[Semantic Version](https://semver.org/) preceded with a `v`. Once the tag is pushed, the github actions you just configured will automatically build release binaries that Packer can download using `packer init`. For more details on how
to install a plugin using `packer init`, see the
[init docs](https://developer.hashicorp.com/packer/docs/commands/init).
Expand Down
Loading